Issue #116 - A new extension / feature for Kay: HTML sanitizing

10 views
Skip to first unread message

Paolo Casciello

unread,
Jan 12, 2012, 6:53:28 AM1/12/12
to kay-...@googlegroups.com
Hi!

I've created also an issue just for reference.

I'm planning to add in Kay a new extension to support sanitizing html input.
For this type of tasks we're using and battle-tested the "bleach" library ( http://pypi.python.org/pypi/bleach ) that depends on html5lib.
It's very useful and customizable to handle text submitted in forms or API. It not only strip tags but can also clean them.

At first I was thinking to include it in the kay.ext namespace and let devels use it directly but we could also include it in the main lib (or utils) and provide an HTMLField type in the form module and allowing to pass parameters to sanitize the HTML content.

I think this could be an elegant solution for Kay, what do you think?

Paolo

Takashi Matsuo

unread,
Jan 21, 2012, 2:52:07 AM1/21/12
to kay-...@googlegroups.com
2012/1/12 Paolo Casciello <paolo.c...@gmail.com>:

Thanks Paolo,
How big your code is? If it's small(I mean, < 200k), let's bundle it.

--
Takashi Matsuo
matsuo....@gmail.com
Kay's daddy

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

Paolo Casciello

unread,
Jan 23, 2012, 1:25:06 PM1/23/12
to kay-...@googlegroups.com
Hi,

# du -hsc html5lib bleach
532K html5lib
 24K bleach
556K total

I think it's too much.. even if it's very useful :P

PS: just updated to latest revision and is working perfectly.

Bye,
  Paolo
Reply all
Reply to author
Forward
0 new messages