This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8536
in repository https://gitbox.apache.org/repos/asf/allura.git

commit ccd6e86694438b05239256ba3b815ca144fafdca
Author: Dave Brondsema <dbronds...@slashdotmedia.com>
AuthorDate: Mon Feb 12 18:16:21 2024 -0500

    [#8536] more move/improve |safe
---
 Allura/allura/lib/widgets/search.py           | 5 +++--
 Allura/allura/templates/user_prefs.html       | 2 +-
 Allura/allura/templates/widgets/lightbox.html | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Allura/allura/lib/widgets/search.py 
b/Allura/allura/lib/widgets/search.py
index 2bef28700..cec39ad44 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 @@ class SearchHelp(ffw.Lightbox):
         # 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 6610ad19f..62d95352d 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 82972260f..624a49f2d 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>

Reply via email to