Examples of replaceFaultyTagWithEndTag()


Examples of org.htmlparser.scanners.LinkScanner.replaceFaultyTagWithEndTag()

        String currentLine =
            "<p>Site Comments?<br><a href=\"mailto:sam@neurogrid.com?subject=Site Comments\">Mail Us<a></p>";
        Tag tag = new Tag(new TagData(85, 87, "a", currentLine));
        LinkScanner linkScanner = new LinkScanner();
        String newLine =
            linkScanner.replaceFaultyTagWithEndTag(tag, currentLine);
        assertEquals(
            "Expected replacement",
            "<p>Site Comments?<br><a href=\"mailto:sam@neurogrid.com?subject=Site Comments\">Mail Us</A></p>",
            newLine);
    }
View Full Code Here

Examples of org.htmlparser.scanners.LinkScanner.replaceFaultyTagWithEndTag()

  public void testReplaceFaultyTagWithEndTag() throws ParserException {
    String currentLine = "<p>Site Comments?<br><a href=\"mailto:sam@neurogrid.com?subject=Site Comments\">Mail Us<a></p>";
    Tag tag = new Tag(new TagData(85, 87, "a", currentLine));
    LinkScanner linkScanner = new LinkScanner();
    String newLine = linkScanner.replaceFaultyTagWithEndTag(tag, currentLine);
    assertEquals("Expected replacement",
        "<p>Site Comments?<br><a href=\"mailto:sam@neurogrid.com?subject=Site Comments\">Mail Us</A></p>",
        newLine);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.