MozSecureWorld FAQ: Difference between revisions

Line 32: Line 32:
Solution: Use Django [https://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe |safe]  
Solution: Use Django [https://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe |safe]  


Problem: After using bleach, the safe tags show up "&lt;b&gt;should be bolded&lt;/b&gt;" instead of being rendered as <b>should be bolded</b>, you have to add a "|safe" to the template: <nowiki><nowiki></nowiki><nowiki>{</nowiki> richtext.comment|safe <nowiki>}</nowiki><nowiki></nowiki></nowiki>
Problem: After using bleach, the safe tags show up "&lt;b&gt;should be bolded&lt;/b&gt;" instead of being rendered as <b>should be bolded</b>, you have to add a "|safe" to the template: <nowiki><nowiki></nowiki><nowiki>{</nowiki> richtext.comment safe <nowiki>}</nowiki><nowiki></nowiki></nowiki>
67

edits