I wrote a filter that searches for patterns in text and replaces them
with <img> tags:

{{ comment.text|smilify }}

It does various silly things like replace :-) with an actual smiley
face image. Seems to work great.

When I combine it with the markdown filter, like this:

{{ comment.text|markdown:"safe"|smilify }}

It seems to escape the HTML that the markdown filter produces. In
other words if my comment text is ":-)" then the output I get (when
viewing the raw HTML source of the document) is &lt;p&gt;<img
src="..." ... />&lt;/p&gt;

Is it not possible to use the markdown filter like this? Or is the
markdown filter supposed to mark its output as safe and my filter is
incorrectly escaping it?

The source for my filter is here:

http://dpaste.com/107803/

Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to