From 611d91e567dcb09da1f9aa1e8d7b42bb4d0427b8 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Fri, 23 Sep 2022 13:47:01 +0200 Subject: [PATCH] SONAR-17296 improve the handlign of the SAML Response attributes in the configuration testign page --- server/sonar-auth-saml/src/main/resources/samlAuthResult.html | 3 ++- .../src/test/resources/samlAuthResultComplete.html | 3 ++- .../src/test/resources/samlAuthResultEmpty.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/sonar-auth-saml/src/main/resources/samlAuthResult.html b/server/sonar-auth-saml/src/main/resources/samlAuthResult.html index c6c0108802d..398266b2d29 100644 --- a/server/sonar-auth-saml/src/main/resources/samlAuthResult.html +++ b/server/sonar-auth-saml/src/main/resources/samlAuthResult.html @@ -76,6 +76,7 @@ padding: 4px 24px 4px 8px; vertical-align: top; font-family: "Courier New", Courier, monospace; + white-space: pre-line; } #content { @@ -154,7 +155,7 @@ const valueNode = document.createElement("td"); // wrap in array, to handle single values as well - valueNode.innerHTML = [].concat(obj[key]).join("
"); + valueNode.textContent = [].concat(obj[key]).join("\r\n"); row.appendChild(valueNode); tbody.appendChild(row); diff --git a/server/sonar-auth-saml/src/test/resources/samlAuthResultComplete.html b/server/sonar-auth-saml/src/test/resources/samlAuthResultComplete.html index fd3b9ac729a..f12552ec361 100644 --- a/server/sonar-auth-saml/src/test/resources/samlAuthResultComplete.html +++ b/server/sonar-auth-saml/src/test/resources/samlAuthResultComplete.html @@ -76,6 +76,7 @@ padding: 4px 24px 4px 8px; vertical-align: top; font-family: "Courier New", Courier, monospace; + white-space: pre-line; } #content { @@ -154,7 +155,7 @@ const valueNode = document.createElement("td"); // wrap in array, to handle single values as well - valueNode.innerHTML = [].concat(obj[key]).join("
"); + valueNode.textContent = [].concat(obj[key]).join("\r\n"); row.appendChild(valueNode); tbody.appendChild(row); diff --git a/server/sonar-auth-saml/src/test/resources/samlAuthResultEmpty.html b/server/sonar-auth-saml/src/test/resources/samlAuthResultEmpty.html index febbb26026f..6ae670910bd 100644 --- a/server/sonar-auth-saml/src/test/resources/samlAuthResultEmpty.html +++ b/server/sonar-auth-saml/src/test/resources/samlAuthResultEmpty.html @@ -76,6 +76,7 @@ padding: 4px 24px 4px 8px; vertical-align: top; font-family: "Courier New", Courier, monospace; + white-space: pre-line; } #content { @@ -154,7 +155,7 @@ const valueNode = document.createElement("td"); // wrap in array, to handle single values as well - valueNode.innerHTML = [].concat(obj[key]).join("
"); + valueNode.textContent = [].concat(obj[key]).join("\r\n"); row.appendChild(valueNode); tbody.appendChild(row); -- 2.39.5