aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api')
-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