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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -