简体   繁体   English

OWASP AntiSamy正在替换espace的换行符(JAVA)

[英]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 " ". 我在JAVA项目中使用OWASP AntiSamy,但是每次尝试用包含\\ n字符的字符串调用getCleanHTML()方法时,该方法都将替换espace“”。 I'm already tried to change the rules in XML file, but it still happening. 我已经尝试过更改XML文件中的规则,但是它仍然在发生。 How do I fix it? 我如何解决它?

I already fix the issue inserting the line 我已经解决了插入行的问题

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

in configuration file 在配置文件中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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