diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectLinks')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx | 5 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/LinkRow-test.tsx.snap | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx b/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx index 49df2cc3647..92ffdfe5690 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx +++ b/server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx @@ -19,6 +19,7 @@ */ import * as React from 'react'; import isValidUri from '../../app/utils/isValidUri'; +import Link from '../../components/common/Link'; import { Button } from '../../components/controls/buttons'; import ConfirmButton from '../../components/controls/ConfirmButton'; import ProjectLinkIcon from '../../components/icons/ProjectLinkIcon'; @@ -93,9 +94,9 @@ export default class LinkRow extends React.PureComponent<Props> { <td className="nowrap">{this.renderName(link)}</td> <td className="nowrap js-url"> {isValidUri(link.url) ? ( - <a href={link.url} rel="nofollow noreferrer noopener" target="_blank"> + <Link to={link.url} target="_blank"> {link.url} - </a> + </Link> ) : ( link.url )} diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/LinkRow-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/LinkRow-test.tsx.snap index e05b8f94f91..1d479fdfb1a 100644 --- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/LinkRow-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/LinkRow-test.tsx.snap @@ -26,13 +26,12 @@ exports[`should render custom link 1`] = ` <td className="nowrap js-url" > - <a - href="http://example.com" - rel="nofollow noreferrer noopener" + <ForwardRef(Link) target="_blank" + to="http://example.com" > http://example.com - </a> + </ForwardRef(Link)> </td> <td className="thin nowrap" @@ -131,13 +130,12 @@ exports[`should render provided link 1`] = ` <td className="nowrap js-url" > - <a - href="http://example.com" - rel="nofollow noreferrer noopener" + <ForwardRef(Link) target="_blank" + to="http://example.com" > http://example.com - </a> + </ForwardRef(Link)> </td> <td className="thin nowrap" |