[#8536] more move/improve |safe
diff --git a/Allura/allura/lib/widgets/search.py b/Allura/allura/lib/widgets/search.py
index 2bef287..cec39ad 100644
--- a/Allura/allura/lib/widgets/search.py
+++ b/Allura/allura/lib/widgets/search.py
@@ -18,6 +18,7 @@
import ew as ew_core
import ew.jinja2_ew as ew
import jinja2
+from markupsafe import Markup
from allura.lib.widgets import form_fields as ffw
@@ -53,8 +54,8 @@
# can't use g.jinja2_env since this widget gets imported too early :(
jinja2_env = jinja2.Environment(
loader=jinja2.PackageLoader('allura', 'templates/widgets'))
- self.content = jinja2_env.get_template('search_help.html').render(dict(
+ self.content = Markup(jinja2_env.get_template('search_help.html').render(dict(
comments=comments,
history=history,
fields=fields,
- ))
+ )))
diff --git a/Allura/allura/templates/user_prefs.html b/Allura/allura/templates/user_prefs.html
index 6610ad1..62d9535 100644
--- a/Allura/allura/templates/user_prefs.html
+++ b/Allura/allura/templates/user_prefs.html
@@ -85,7 +85,7 @@
</p>
</div>
</form>
- {{c.enter_password.display(content='<h1>Enter password</h1>')}}
+ {{c.enter_password.display(content='<h1>Enter password</h1>'|safe)}}
<!-- end popup -->
{% endif %} {# allow_edit_prefs #}
diff --git a/Allura/allura/templates/widgets/lightbox.html b/Allura/allura/templates/widgets/lightbox.html
index 8297226..624a49f 100644
--- a/Allura/allura/templates/widgets/lightbox.html
+++ b/Allura/allura/templates/widgets/lightbox.html
@@ -21,6 +21,6 @@
{% if content_template %}
{% include content_template with context %}
{% else %}
- {{content|safe}}
+ {{content}}
{% endif %}
</div>