gFontaniva
gFontaniva

Reputation: 903

OWASP AntiSamy are replacing line breaks to espaces (JAVA)

I'm using OWASP AntiSamy in a JAVA project but everytime I try call the method getCleanHTML() with a string that contains \n character, the method are replacing for a espace " ". I'm already tried to change the rules in XML file, but it still happening. How do I fix it?

Upvotes: 2

Views: 940

Answers (1)

gFontaniva
gFontaniva

Reputation: 903

I already fix the issue inserting the line

<directive name="preserveSpace" value="true" />

in configuration file

Upvotes: 6

Related Questions