google app engine - webapp2 changes html tags in pure text -


i want make gae application webapp2 compatible. code worked great webapp:

insert = '<p><font color="red"><b>some text</b></font></p>'    template_values = { 'insert': insert, ... }  path = ... self.response.out.write(template.render(path,template_values)) 

the content of variable insert put web page output webapp. content of variable "analyzed" webapp2 , content changed when inserted in webpage.

webapp2 inserts this:

&lt;p&gt;&lt;font color=&quot;red&quot;&gt;&lt;b&gt;some text&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; 

how can go old behavior?

thanks help.

have @

safe : https://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe &

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

eg:

{{ inserthtml|safe }} or

{% autoescape off %}{{ inserhtml }}{% endautoescape %} 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -