Skip to content

Commit

Permalink
Test for jhy#851
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Feb 2, 2020
1 parent 279fbe1 commit 97758e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/java/org/jsoup/parser/HtmlParserTest.java
Expand Up @@ -1276,4 +1276,15 @@ public void testH20() {
Document doc = Jsoup.parse(html);
assertEquals("H2O", doc.text());
}

@Test
public void testUNewlines() {
// https://github.com/jhy/jsoup/issues/851
String html = "t<u>es</u>t <b>on</b> <i>f</i><u>ir</u>e";
String clean = Jsoup.clean(html, Whitelist.basic());
assertEquals("t<u>es</u>t <b>on</b> <i>f</i><u>ir</u>e", clean);

Document doc = Jsoup.parse(html);
assertEquals("test on fire", doc.text());
}
}

0 comments on commit 97758e7

Please sign in to comment.