AntiSamy properties issue with break line

197 views Asked by At

I'm trying to use AntiSamy in java but I'm getting problem with break line.

This is the value from GUI: First line\r\nSecond line

This is the value with org.owasp.validator.html.CleanResults: First line\nSecond line

When I try to compare the answer is false.

value.equals(cr.getCleanHTML());

My Properties:

<directives>
    <directive name="omitXmlDeclaration" value="true"/>
    <directive name="omitDoctypeDeclaration" value="true"/>
    <directive name="maxInputSize" value="5000"/>
    <directive name="useXHTML" value="true"/>
    <directive name="formatOutput" value="false"/>
    <directive name="preserveSpace" value="true" />

    <directive name="embedStyleSheets" value="false"/>
</directives>

Any idea?

0

There are 0 answers