Hi there, You could parse the input with elementree or beautifulsoup and then filter out all tags except the ones you want. You could wrap all that logic up in a validator. This is what i did for my blog. Not sure if it is the most efficient, but it's a sure bet more maintainable than constructing just the right regular expression, IMHO.
Another option would be to accept and parse BBcode, instead of pure HTML tags. You can search for one or just check out http://krys.ca/entry/56/ for the link. Finally, the last option I can think of would be to use ReStructuredText format (docutils package) or some kind of wiki format and parse it to html before feeding it to Kid. (Like what the 20 minute wiki demo does.) Anyway, hope this helps. Krys On Friday 1 June 2007 17:36, iain duncan wrote: > Wondering what others are using ( or how ) if they want to allow users > to submit certain html tags in their content. ( like say links and > headlines ). I found out how to allow certain tags through with kid, but > of course the input needs to be validated so they don't break the rest > of the page. > > Thanks > Iain > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

