[Owasp-antisamy] getCleanHTML() formatting changes

Shishir Kumar shishirroy2000 at gmail.com
Thu Sep 18 05:48:12 EDT 2008


Hi,

While working with AntiSamy 2.1 I figured that getCleanHTML changes the
input format.

E.g. User Input:

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.

Note that I have defined directive formatOutput as true.

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

Thanks,

Shishir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/owasp-antisamy/attachments/20080918/ed432998/attachment.html 


More information about the Owasp-antisamy mailing list