2

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?

gFontaniva
  • 897
  • 11
  • 27

1 Answers1

5

I already fix the issue inserting the line

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

in configuration file

gFontaniva
  • 897
  • 11
  • 27
  • If that works, go ahead and mark your answer as correct. – DavidS Sep 30 '15 at 17:42
  • 1
    Do this same work for 'antisamy-tinymce-1.4.4.xml' policy. I am adding it to true. It is still replacing new lines and spaces. – goCode May 31 '16 at 08:01