diff options
| author | Magnus Hagander | 2024-12-13 12:57:40 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2024-12-13 12:57:40 +0000 |
| commit | d3735cc897a3157917b7044056dff0a8fbc243b3 (patch) | |
| tree | be18ba4a335d8ce0953ef9a54e5707cd221da9c8 /postgresqleu/confreg | |
| parent | f3695b6a6b80524fb151fb0680b7bc5c86bf5f05 (diff) | |
Use markupsafe.Markup instead of jinja2.Markup
This has been deprecated for a while and even before that (since 2.5) it
was just an alias, so switching our import should make no difference
other than working on jinja2 3.1.
Diffstat (limited to 'postgresqleu/confreg')
| -rw-r--r-- | postgresqleu/confreg/jinjafunc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/postgresqleu/confreg/jinjafunc.py b/postgresqleu/confreg/jinjafunc.py index bd303d7a..6a820afa 100644 --- a/postgresqleu/confreg/jinjafunc.py +++ b/postgresqleu/confreg/jinjafunc.py @@ -24,6 +24,7 @@ from postgresqleu.util.templatetags import svgcharts from postgresqleu.util.templatetags.assets import do_render_asset from postgresqleu.util.messaging import get_messaging_class_from_typename +import markupsafe import jinja2 import jinja2.sandbox try: @@ -319,7 +320,7 @@ extra_filters = { 'timesince': timesince, 'groupby_sort': filter_groupby_sort, 'leadingnbsp': leadingnbsp, - 'markdown': lambda t: jinja2.Markup(markdown.markdown(t, extensions=['tables', ])), + 'markdown': lambda t: markupsafe.Markup(markdown.markdown(t, extensions=['tables', ])), 'shuffle': filter_shuffle, 'slugify': slugify, 'yesno': lambda b, v: v.split(',')[not b], |
