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 .

Answers


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

Why MenuItem doesn't send specified parameters but Button send

wpf routed-commands imultivalueconverter

<MenuItem Command="local:CommandLibrary.RegisterServiceCommand">

Add to generic List property and save in viewstate

c# linq generics properties viewstate

I'm using a generic List to store a set of data in the viewstate. If I try sorting the list using linq in the get accessor then when I try to add a new item to the list if doesn't work. No error, i...

ClassNotFoundException problems with manifest in created JAR

java jar classnotfoundexception manifest.mf

I'm trying to create a JAR file from my sources, but when I run it I get class not found exception - it can't find the main class, even though I defined it in the MANIFEST.MF file. Can you spot any