diff options
author | guillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com> | 2023-10-26 15:35:38 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-10-26 20:02:58 +0000 |
commit | 3d5f7d3271020fa2cca9fc1f5ec5eb2bf2d2585e (patch) | |
tree | cedfb9797354f28347ec10401c76105015e1d4e6 /server | |
parent | 8504e3556874d6f63463284e8844e27ddf4b2367 (diff) | |
download | sonarqube-3d5f7d3271020fa2cca9fc1f5ec5eb2bf2d2585e.tar.gz sonarqube-3d5f7d3271020fa2cca9fc1f5ec5eb2bf2d2585e.zip |
SONAR-20901 Quality Gate can't be displayed in details if name contains %
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/helpers/urls.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts index 99b03c8a463..3b302c6fb82 100644 --- a/server/sonar-web/src/main/js/helpers/urls.ts +++ b/server/sonar-web/src/main/js/helpers/urls.ts @@ -313,8 +313,10 @@ export function getQualityProfileUrl(name: string, language: string): To { } export function getQualityGateUrl(name: string): To { + // This is a workaround for the react router bug: https://github.com/remix-run/react-router/issues/10814 + const qualityGateName = name.replace(/%/g, '%25'); return { - pathname: '/quality_gates/show/' + encodeURIComponent(name), + pathname: '/quality_gates/show/' + encodeURIComponent(qualityGateName), }; } |