From: Revanshu Paliwal Date: Fri, 16 Dec 2022 15:03:03 +0000 (+0100) Subject: SONAR-17579 UI changes to open external links from user input in a new tab X-Git-Tag: 9.9.0.65466~180 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4a756e45451336c8142ca3dc83e31a1b318f2614;p=sonarqube.git SONAR-17579 UI changes to open external links from user input in a new tab --- diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx index 795a6b0e6c3..724ebbaceb0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx @@ -23,7 +23,7 @@ import FormattingTips from '../../../components/common/FormattingTips'; import { Button, ResetButtonLink } from '../../../components/controls/buttons'; import RuleTabViewer from '../../../components/rules/RuleTabViewer'; import { translate, translateWithParameters } from '../../../helpers/l10n'; -import { sanitizeString } from '../../../helpers/sanitize'; +import { sanitizeString, sanitizeUserInput } from '../../../helpers/sanitize'; import { RuleDetails } from '../../../types/types'; import { RuleDescriptionSections } from '../rule'; import RemoveExtendedDescriptionModal from './RemoveExtendedDescriptionModal'; @@ -115,7 +115,9 @@ export default class RuleDetailsDescription extends React.PureComponent )} {this.props.canWrite && ( diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx index 87a55a8b372..6f9754d44b1 100644 --- a/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx +++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotReviewHistory.tsx @@ -27,7 +27,7 @@ import IssueChangelogDiff from '../../../components/issue/components/IssueChange import Avatar from '../../../components/ui/Avatar'; import { PopupPlacement } from '../../../components/ui/popups'; import { translate, translateWithParameters } from '../../../helpers/l10n'; -import { sanitizeString } from '../../../helpers/sanitize'; +import { sanitizeUserInput } from '../../../helpers/sanitize'; import { Hotspot, ReviewHistoryType } from '../../../types/security-hotspots'; import { getHotspotReviewHistory } from '../utils'; import HotspotCommentPopup from './HotspotCommentPopup'; @@ -106,7 +106,7 @@ export default function HotspotReviewHistory(props: HotspotReviewHistoryProps) {
{updatable && (
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx index 107dc765de7..80a6e83c515 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx +++ b/server/sonar-web/src/main/js/apps/sessions/components/Login.tsx @@ -22,7 +22,7 @@ import { Location } from '../../../components/hoc/withRouter'; import { Alert } from '../../../components/ui/Alert'; import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { translate } from '../../../helpers/l10n'; -import { sanitizeString } from '../../../helpers/sanitize'; +import { sanitizeUserInput } from '../../../helpers/sanitize'; import { getReturnUrl } from '../../../helpers/urls'; import { IdentityProvider } from '../../../types/types'; import './Login.css'; @@ -62,7 +62,7 @@ export default function Login(props: LoginProps) {
)} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx index 6af35c4f0b2..0acda77c787 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForFormattedText.tsx @@ -22,7 +22,7 @@ import FormattingTipsWithLink from '../../../../components/common/FormattingTips import { Button } from '../../../../components/controls/buttons'; import EditIcon from '../../../../components/icons/EditIcon'; import { translate } from '../../../../helpers/l10n'; -import { sanitizeString } from '../../../../helpers/sanitize'; +import { sanitizeUserInput } from '../../../../helpers/sanitize'; import { DefaultSpecializedInputProps } from '../../utils'; export default function InputForFormattedText(props: DefaultSpecializedInputProps) { @@ -54,7 +54,7 @@ export default function InputForFormattedText(props: DefaultSpecializedInputProp