Malcolm Tredinnick wrote:
>> Better yet, the thing that creates colorizedCode should mark it as
>> "safe" (i.e. not requiring escaping) in this fashion:
>>
>> from django.utils.safestring import mark_safe
>> def colorize():
>> # ...
>> return mark_safe(result)
>
> Alt
On Sat, 2008-09-20 at 20:42 +0400, Ivan Sagalaev wrote:
> tsmets wrote:
> > OK !
> > I found it : http://code.djangoproject.com/wiki/AutoEscaping
> >
> > {% autoescape off %}
> > {{ body }}
> > {% endautoescape %}
>
> Or just {{ body|safe }}.
>
> Better yet, the thing that creates colorizedCod
tsmets wrote:
> OK !
> I found it : http://code.djangoproject.com/wiki/AutoEscaping
>
> {% autoescape off %}
> {{ body }}
> {% endautoescape %}
Or just {{ body|safe }}.
Better yet, the thing that creates colorizedCode should mark it as
"safe" (i.e. not requiring escaping) in this fashion:
djangobook.com is outdated. It states that it covers "0.96 and
higher", but the "and higher" part is misleading because it doesn't
cover 1.0 as far as I know.
Erik
On 20.09.2008, at 15:49, tsmets wrote:
>
> OK !
> I found it : http://code.djangoproject.com/wiki/AutoEscaping
>
> {% autoescap
OK !
I found it : http://code.djangoproject.com/wiki/AutoEscaping
{% autoescape off %}
{{ body }}
{% endautoescape %}
\T,
ps : It seems I did not find it in the django book either
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Django auto-escapes all variable output in templates. You can read the
docs about this.
Erik
On 20.09.2008, at 15:32, tsmets wrote:
>
>
> I am writting a home brewed version of http://dpaste.com
> I manage to convert/colorize most the code with pygment.
>
> However when I print the content of
I am writting a home brewed version of http://dpaste.com
I manage to convert/colorize most the code with pygment.
However when I print the content of the "colorized" code in the
function, I have the correct html code as colorized by pygment. Then I
do :
[code]
return render_to_response('dpas
7 matches
Mail list logo