Package org.rendersnake.test

Source Code of org.rendersnake.test.CrossSiteScriptingTest

package org.rendersnake.test;

import junit.framework.TestCase;

import org.rendersnake.HtmlAttributes;
import org.rendersnake.HtmlCanvas;

public class CrossSiteScriptingTest extends TestCase {
    public void testContent() throws Exception {
        HtmlCanvas html = new HtmlCanvas();
        html.write("<&>");
        assertEquals("&lt;&amp;&gt;",html.toHtml());
    }
    public void testAttributeContent() throws Exception {
        HtmlAttributes attrs = new HtmlAttributes();
        attrs.content("<&>");
        assertEquals(" content=\"&lt;&amp;&gt;\"",attrs.toHtml());
    }
}
TOP

Related Classes of org.rendersnake.test.CrossSiteScriptingTest

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.