Monday, July 4, 2011

Hacked Simple Sanitizer, added tags and style

I hacked the simple sanitizer to be more useful for me. I think it needs more tags including the style tag, that is minus the possibility of javascript in the style tag which I clean at the end. I also fixed the sanitizer so it could have attributes in the tag.
 
Check out the code here:
http://code.google.com/p/gwt-examples/wiki/SafeHtml?ts=1309798060&updated=SafeHtml#Sanitizing_HTML

Did I miss a tag?

Brandon Donnelson
http://gwt-examples.googlecode.com

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/MsLGNtiaVHIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment