diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-05-12 18:43:58 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-05-12 18:44:06 +0200 |
commit | 1f906357067c5256314d6c899e76c86f60f7f559 (patch) | |
tree | 2723c0e6625bf1adefd69af127a444d4e6984090 /sonar-markdown/src/test | |
parent | f59a579d18a7dc338c9adab23806019b14ac5c27 (diff) | |
download | sonarqube-1f906357067c5256314d6c899e76c86f60f7f559.tar.gz sonarqube-1f906357067c5256314d6c899e76c86f60f7f559.zip |
SONAR-4681 SONAR-5295 Escape HTML before markdown interpolation
Diffstat (limited to 'sonar-markdown/src/test')
-rw-r--r-- | sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java index 909fda8c539..462bee37175 100644 --- a/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java +++ b/sonar-markdown/src/test/java/org/sonar/markdown/MarkdownTest.java @@ -67,8 +67,10 @@ public class MarkdownTest { @Test public void shouldDecorateBlockquote() { - assertThat(Markdown.convertToHtml("> Yesterday it worked\n> Today it is not working\r\n> Software is like that\r")) - .isEqualTo("<blockquote>Yesterday it worked<br/>\nToday it is not working<br/>\r\nSoftware is like that<br/>\r</blockquote>"); + assertThat(Markdown.convertToHtml("> Yesterday <br/> it worked\n> Today it is not working\r\n> Software is like that\r")) + .isEqualTo("<blockquote>Yesterday <br/> it worked<br/>\nToday it is not working<br/>\r\nSoftware is like that<br/>\r</blockquote>"); + assertThat(Markdown.convertToHtml("HTML elements should <em>not</em> be quoted!")) + .isEqualTo("HTML elements should <em>not</em> be quoted!"); } @Test |