AntiSamy adds new line character "\n"

854 views Asked by At

After cleaning the dirty input , Antisamy prepends new line character "\n" and replaces " " space with "\n". I am using antisamy 1.5.3 jar.

For e.g.: below is the output after cleaning json

"\n{\"instanceId\":\"54117\",\"chatTime\":\"11:30\nAM\"}

here

11:30\nAM..this was 11:30 AM

1

There are 1 answers

0
Hitesh Ghuge On BEST ANSWER

It worked after modifying formatOutput to false and adding preserveSpace to true in policy file