Thanks, can i strip out all tags other than <a> tags.

I would like people to be able to put links in comments.

Andrew

On 25 Aug, 03:42, Parag Shah <[email protected]> wrote:
> 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
> <[email protected]>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 Shahhttp://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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to