NdsBeisEsb/src/test/java/com/northgateps/nds/beis/utils/BeisHtmlSanitizerRouteTest.java
/** Test some happy cases when white list html tag is provided as input html. */
Test some happy cases when white list html tag is provided as input html.
Test some happy cases when white list html tag is provided as input html .
@Test
    public void testListIsDecoratedWithClassAttribute() throws ScriptException {
        String untrustedHTML="<ul><li>Test1</li><li>Test2</li></ul>";
        String expectHTML="<ul class=\"list list-bullet\"><li>Test1</li><li>Test2</li></ul>";
        String safeHTML = BeisHtmlSanitizer.sanitizeHtml(untrustedHTML);
        assertEquals("Checking if output decorated with gds class attribute for trusted html input", safeHTML, expectHTML);
    }
@ Test public void testListIsDecoratedWithClassAttribute ( ) throws ScriptException { String untrustedHTML = "<ul><li>Test1</li><li>Test2</li></ul>" ; String expectHTML = "<ul class=\"list list-bullet\"><li>Test1</li><li>Test2</li></ul>" ; String safeHTML = BeisHtmlSanitizer . sanitizeHtml ( untrustedHTML ) ; assertEquals ( "Checking if output decorated with gds class attribute for trusted html input" , safeHTML , expectHTML ) ; }
Test some happy cases when white list html tag is provided as input html.
Test some happy cases when white list html tag is provided as input html .