The more recent versions of Django do autoescaping of template
variables -- looks like that's your trouble. How recently did you
upgrade? Revision 143 of FBO, from about a month ago, sends the
doc.format_icon_url through the "safe" filter, and should solve your
problem.
In the move toward a CSSZenOpac-type FBO I want to change the current
situation, though, in that I'd rather handle icons in the CSS instead
of a config file. As it is now, we've got:
# discovery/config.py
FORMAT_ICONS = { 'eAudio' : '<img
src="http://catalog.spl.org/hipres/images/formaticons/ipac-icon-eaudio.gif"
alt="eAudio" />',
...
}
# discovery/templates/search.html
<td align="right">{{ doc.format_icon_url|safe }}</td>
I'd rather have something like:
# discovery/templates/search.html
<div class="{{ doc.format }} format"><span>{{ doc.format }}</span></div>
# media/001/001.css
.format span {
display: none;
}
.eAudio {
background-image:
url(http://catalog.spl.org/hipres/images/formaticons/ipac-icon-eaudio.gif);
}
...
It's a little more verbose, but it allows the icons to change from
stylesheet to stylesheet. And we don't run into these templating
issues.