Reputation: 63
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?
Upvotes: 1
Views: 213