On Jan 26, 3:39 pm, Margie <[email protected]> wrote:
> Hi,
>
> I am trying to generate a symbol for true and false in my table, but
> am having problems with the escaping of quotes and also with
> generating the < > tags.  If I use the code below:
>        <td>{{ task.done|yesno:"<img src=\"img/icon-no.gif\" alt=\"False
> \" />,<img src=\"img/icon-no.gif\" alt=\"False\" />" }}</td>
>
> it ends up generating this:
>
> <td>
>   <img src="%22img/icon-no.gif%22" alt=""False"">
> </td>
>
> < ends up being <, > ends up being > and my quotes become
> "  Could someone give me an example of how to use yesno to
> generate an image?
>
> Margie

Sounds like your output is being "auto-escaped". Search the docs for
Auto Escaping, and how to control that in the template.
--~--~---------~--~----~------------~-------~--~----~
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