I have some HTML in a DB field. How can I get it to display as
rendered HTML in a Django template.
Is there a filter or tag that I should use before the {{variable}} tag
in the Django template?
In Django 0.96 (which is built into appengine) you need to use the
escape filter:
{{
I must still be doing something wrong..
If my stored string is - bhello/b
If I include {{item.text}} in my template I get -bhello/b
and if I include {{item.text|escape}} I get -lt;bgt;hellolt;/
bgt;
but I am trying to achieve a bold hello
On Nov 15, 5:31 pm, Alexander Kojevnikov
No,
I am just using the built-in 0.96 templating system and the 'safe'
filter does not work in that version.
On Nov 15, 6:10 pm, Alexander Kojevnikov [EMAIL PROTECTED]
wrote:
I must still be doing something wrong..
If my stored string is - bhello/b
If I include {{item.text}} in my
No,
I am just using the built-in 0.96 templating system and the 'safe'
filter does not work in that version.
Could you post here your template and the code that renders it?
I see two reasons why it doesn't work as expeced:
1. Your html is already escaped in the datastore.
2. Your