@@ -720,15 +720,8 @@ public class HtmlParserTest {
720720 // and the <i> inside the table and does not leak out.
721721 String h = "<p><b>One</p> <table><tr><td><p><i>Three<p>Four</i></td></tr></table> <p>Five</p>" ;
722722 Document doc = Jsoup .parse (h );
723- String want = "<p><b>One</b></p><b>\n " +
724- " <table>\n " +
725- " <tbody>\n " +
726- " <tr>\n " +
727- " <td><p><i>Three</i></p><p><i>Four</i></p></td>\n " +
728- " </tr>\n " +
729- " </tbody>\n " +
730- " </table><p>Five</p></b>" ;
731- assertEquals (want , doc .body ().html ());
723+ String want = "<p><b>One</b></p><b><table><tbody><tr><td><p><i>Three</i></p><p><i>Four</i></p></td></tr></tbody></table><p>Five</p></b>" ;
724+ assertEquals (want , TextUtil .stripNewlines (doc .body ().html ()));
732725 }
733726
734727 @ Test public void commentBeforeHtml () {
@@ -777,7 +770,7 @@ public class HtmlParserTest {
777770
778771 Document two = Jsoup .parse ("<title>One<b>Two <p>Test</p>" ); // no title, so <b> causes </title> breakout
779772 assertEquals ("One" , two .title ());
780- assertEquals ("<b>Two <p>Test</p></b>" , two .body ().html ());
773+ assertEquals ("<b>Two \n <p>Test</p></b>" , two .body ().html ());
781774 }
782775
783776 @ Test public void handlesUnclosedScriptAtEof () {
@@ -1470,7 +1463,7 @@ private boolean didAddElements(String input) {
14701463 assertEquals (1 , nodes .size ());
14711464 Node node = nodes .get (0 );
14721465 assertEquals ("h2" , node .nodeName ());
1473- assertEquals ("<p><h2>text</h2></p>" , node .parent ().outerHtml ());
1466+ assertEquals ("<p>\n <h2>text</h2></p>" , node .parent ().outerHtml ());
14741467 }
14751468
14761469 @ Test public void nestedPFragments () {
@@ -1479,7 +1472,7 @@ private boolean didAddElements(String input) {
14791472 List <Node > nodes = new Document ("" ).parser ().parseFragmentInput (bareFragment , new Element ("p" ), "" );
14801473 assertEquals (2 , nodes .size ());
14811474 Node node = nodes .get (0 );
1482- assertEquals ("<p><p></p><a></a></p>" , node .parent ().outerHtml ()); // mis-nested because fragment forced into the element, OK
1475+ assertEquals ("<p>\n <p></p><a></a></p>" , node .parent ().outerHtml ()); // mis-nested because fragment forced into the element, OK
14831476 }
14841477
14851478 @ Test public void nestedAnchorAdoption () {
0 commit comments