On Jan 26, 3:58 pm, Almost George <almostgeo...@almostexciting.com>
wrote:
> On Jan 26, 3:39 pm, Margie <margierogin...@yahoo.com> 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.


Sorry for the extra post, but I thought I would provide a link:

http://docs.djangoproject.com/en/dev/ref/templates/builtins/#autoescape

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