Jinja 2 safe keyword

I have a little problem understanding what an expression like {{ something.render() | safe }} does .

From what I have seen, without the safe keyword it outputs the entire html document, not just the true content.

What I would like to know, is what it actually does, how it functions .


The safe filter explicitly marks a string as "safe", i.e., it should not be automatically-escaped if auto-escaping is enabled.

The documentation on this filter is here.

See the section on manual escaping to see which characters qualify for escaping.

Need Your Help

set banner background color

css twitter-bootstrap

I am running a play framework (with scala) tutorial and have the css set as per what is mentioned. I get white background to top banner while tutorial gets dark background. I am new to css and coul...

How can I detect video file duration in minutes with PHP?

php video

I am trying to detect the duration of any video file before it is uploaded with PHP

How to get real JPanel Size?

java swing size jpanel

How should I get real JPanel size in JFrame?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.