Created attachment 1878378 [details] Screenshot The cluster settings page shows a message when the cluster is no upgradeable. Sometimes this message contains URLs, which we should turn into links in the UI with the Linkify component. Example message: "Kubernetes 1.25 and therefore OpenShift 4.12 remove several APIs which require admin consideration. Please see the knowledge article https://access.redhat.com/articles/6955381 for details and instructions." (See screenshot.)
The existing behavior is to pass the content to SyncMarkdownView (see https://github.com/openshift/console/blob/5aebdf4faa6e050e5c4db83095739f71a303d6ef/frontend/public/components/cluster-settings/cluster-settings.tsx#L950) as the content can contain markdown. I don't think SyncMarkdownView and Linkify are compatible?
Hm, it looks like showdown has an auto link option we could try: https://github.com/showdownjs/showdown simplifiedAutoLink: (boolean) [default false] Turning this option on will enable automatic linking to urls. This means that: some text www.google.com will be parsed as <p>some text <a href="www.google.com">www.google.com</a> Although if the message is meant to be markdown, it would be better to include <> angle brackets around the URL in the message itself, then it should just work.
Checked on ocp 4.11 cluster with payload 4.11.0-0.nightly-2022-05-17-060006. Steps to verify: 1.Construct fake message containing 3 types of links from clusteroperator for testing. $ cat <<EOF >co.yaml apiVersion: config.openshift.io/v1 kind: ClusterOperator metadata: name: testing spec: {} EOF $ oc apply -f co.yaml $ oc proxy & $ curl -k -XPATCH -H "Accept: application/json" -H "Content-Type: application/json-patch+json" 'http://127.0.0.1:8001/apis/config.openshift.io/v1/clusteroperators/testing/status' -d '[{"op": "add", "path": "/status", "value": {"conditions": [{"lastTransitionTime": "2021-06-01T01:01:01Z", "type": "Upgradeable", "status": "False", "reason": "Testing", "message": "The whatsits are broken.Pls refer to: 1. http://www.example.com 2. <http://www.example.com> 3. [http://www.baidu.com](http://www.baidu.com)"}]}}]' 2. Check on clustersettings details page. The 3 types of links could be shown and open correctly. Pls see screenshot. The bug is fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069