简体   繁体   中英

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?

I already fix the issue inserting the line

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

in configuration file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM