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 the "colorized" code in the
> function, I have the correct html code as colorized by pygment. Then I
> do  :
>
> [code]
>  return render_to_response('dpaste/showCode.html',
>                            {'colorizedCode' : colorizedCode,
> 'author' : author } )
> [code]
> but the browser receives entities only !
>
> So, inpython, I have:
> 2008-09-20 13:58:25,803 - showCode - CRITICAL - Colorized code : "<div
> class="highlight"><pre><span class="c">#!/usr/bin/python</span>
> <span class="k">print</span> <span class="s">&quot;Hello World! 
> &quot;</
> span>
> </pre></div>
> "
>
> meanwhile in the Browser I receive the following :
>
>    &lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span
> class=&quot;c&quot;&gt;#!/usr/bin/python&lt;/span&gt;
> &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span
> class=&quot;s&quot;&gt;&amp;quot;Hello World!&amp;quot;&lt;/span&gt;
>
> &lt;/pre&gt;&lt;/div&gt;
>
> I have read  a few posts on this list but ... as I don't /escape/ the
> variable in the template...
> I wonder what I need to do to stop this behavior ! ? ! ?
>
> Tx,
>
> \T,
>
>
>
> >


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