On Fri, Oct 5, 2012 at 9:20 AM, Ashish Jain <[email protected]> wrote:
> Hi,
>
> I wrote a simple filter as:
>
> @register.filter()
> def html(value):
>     return '<p>Check</p>'
>
> when I use this filter in my template, it displays html as:
>
> <p>Check</p>
>
> I want to display as:
>
> Check
>
> am I missing something.
>

You haven't marked the output as safe, so Django escapes it:

https://docs.djangoproject.com/en/1.4/howto/custom-template-tags/#filters-and-auto-escaping

You want option 2.

Cheers

Tom

-- 
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