[Owasp-antisamy] getCleanHTML remove the line breaks

Irawan irwn4808 at yahoo.com.sg
Wed Jun 23 22:13:53 EDT 2010


Hi All,

I am trying to figure out how I can prevent AntiSamy (1.3) to remove the 
line break from the input characters.  I saw from the old mail in the 
mailing list someone has the same problem; but unfortunately I don't see 
any reply to that.
searching in google also doesn't produce much information at all.

FYI, I also set the following directive to try without success:
<directive name="preserveComments" value="true" />
<directive name="preserveSpace" value="true"/>

Can anyone help me how to prevent that from happening?  We have 
requirement to preserve the line break.  appreciate the help.

Thanks,
Iwan


Below are the snippet from the old email:

String testData = "Hi,\r\n\r\nTesting the HTML tag. Only content Can you
filter me? should be saved.\r\n\r\n<html>Can you filter me?</html>";

System.*out*.println("Output: \n" + cr.getCleanHTML());

Display:

Output:

Hi, Testing the HTML tag. Only content Can you filter me? should be saved.
Can you filter me?

The multiline formatting is lost in cleaned output. Is this a problem or we
have alternative way to configure formatting.




More information about the Owasp-antisamy mailing list