KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Typically when you want to mark string output as safe in Jinja2 you do something like this: {{ output_string|safe() }} However, what if output_string is always safe? I don't want to repeat myself every time by using the safe filter. I have a custom filter called "emailize" that preps urls for output in an email. The ampersands always seem to become escaped. Is there a way in my custom filter to mark the output as safe?
Tags (comma-separated)
Save Edits
Cancel