Hi, You can use the strip_tags function to strip all html from text.
from django.utils.html import strip_tags In your view comment = strip_tags(request.POST["comment"]) -- Regards Parag On Tue, Aug 25, 2009 at 4:25 AM, When ideas fail <andrewkenyon...@gmail.com>wrote: > > Hello, i want to allow users to post comments and I don't want them to > be allowed to put html in comments. > > However I would like the to be able to use paragraph p tags and <a> > tags but not anything other. Could someone tell me how to do this? > > Thanks > > Andrew > > > -- Thanks & Regards Parag Shah http://blog.adaptivesoftware.biz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---