NdsBeisEsb/src/test/java/com/northgateps/nds/beis/utils/BeisHtmlSanitizerRouteTest.java
/** Test some failure cases when untrusted html tag is provided as input html. */
Test some failure cases when untrusted html tag is provided as input html.
Test some failure cases when untrusted html tag is provided as input html .
@Test
    public void testUntrustedHtmlIsStrippedOut() throws ScriptException {
        String untrustedHTML="<times><time>Test1</time><times>";
        String expectHTML="Test1";
        String safeHTML = BeisHtmlSanitizer.sanitizeHtml(untrustedHTML);
        assertEquals("Checking output for untrusted html input", safeHTML, expectHTML);
    }
@ Test public void testUntrustedHtmlIsStrippedOut ( ) throws ScriptException { String untrustedHTML = "<times><time>Test1</time><times>" ; String expectHTML = "Test1" ; String safeHTML = BeisHtmlSanitizer . sanitizeHtml ( untrustedHTML ) ; assertEquals ( "Checking output for untrusted html input" , safeHTML , expectHTML ) ; }
Test some failure cases when untrusted html tag is provided as input html.
Test some failure cases when untrusted html tag is provided as input html .