aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src
diff options
context:
space:
mode:
authorZipeng WU <zipeng.wu@sonarsource.com>2021-04-01 18:43:48 +0200
committersonartech <sonartech@sonarsource.com>2021-04-01 20:03:45 +0000
commit39abd3de73733b18e99c5e81ab7f2dec45d9aec7 (patch)
tree99969d4909635846b354ed00c8df95f56f3917b7 /sonar-plugin-api/src
parente953a52312c1809ee1b46bf5d3186be4cc21cd94 (diff)
downloadsonarqube-39abd3de73733b18e99c5e81ab7f2dec45d9aec7.tar.gz
sonarqube-39abd3de73733b18e99c5e81ab7f2dec45d9aec7.zip
Revert "SONAR-14642 - SSF-142"
This reverts commit 0810d5dcbc8e49b4f064223cd271225acb397e83.
Diffstat (limited to 'sonar-plugin-api/src')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java1
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java10
2 files changed, 1 insertions, 10 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
index 569045ff18f..132978badd3 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
@@ -74,7 +74,6 @@ public class JsonWriter implements AutoCloseable {
this.stream = new com.google.gson.stream.JsonWriter(writer);
this.stream.setSerializeNulls(false);
this.stream.setLenient(false);
- this.stream.setHtmlSafe(true);
this.serializeEmptyStrings = true;
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java
index 9ae97fcfa35..ad523fb74f9 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java
@@ -152,15 +152,7 @@ public class JsonWriterTest {
underTest.beginObject()
.prop("foo", "<hello \"world\">")
.endObject().close();
- expect("{\"foo\":\"\\u003chello \\\"world\\\"\\u003e\"}");
- }
-
- @Test
- public void escape_html_characters() {
- underTest.beginObject()
- .prop("foo", "123<>abc")
- .endObject().close();
- expect("{\"foo\":\"123\\u003c\\u003eabc\"}");
+ expect("{\"foo\":\"<hello \\\"world\\\">\"}");
}
@Test