validationesapiantisamy

AntiSamy is not allowing me to input form fields


I have a RichTextArea from CKEditor. And I recently made some changes to sanitize HTML input.

Normal things go through fine but any form fields like checkboxes, textareas, radio buttons etc are stripped out.(I am using getValidSafeHTML to sanitize my HTML).

I have tried different policy files like this thing here which is supposed to allow everything http://code.google.com/p/owaspantisamy/downloads/detail?name=antisamy-anythinggoes-1.4.4.xml

For example,

<form method="get" name="sampleform"><input name="radio" type="radio" />&nbsp;</form>

becomes

<form method="get" name="sampleform">&nbsp;</form>

Anybody have any idea why this is happening?

Thanks in advance


Solution

  • I just found the reason why this is happening... I was using the antisamy-1.3.jar. This looks like a bug in this version of antisamy. I needed to upgrade to antisamy-1.5.3.

    So just check the versions of your antisamy jars. You might be facing the same issue