Updates per jinja2 breaking changes

This commit is contained in:
Drew DeVault 2022-04-11 22:10:33 +02:00
parent 67c96a4a54
commit 23ed990f12
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import json
import re
from datetime import timedelta
from functools import wraps
from jinja2.utils import Markup, escape
from markupsafe import Markup, escape
from srht.flask import icon, csrf_token, date_handler
from srht.markdown import markdown, SRHT_MARKDOWN_VERSION
from srht.cache import get_cache, set_cache

View File

@ -1,5 +1,5 @@
from flask import has_app_context, url_for
from jinja2.utils import unicode_urlencode
from jinja2.utils import url_quote
from todosrht.types import ParticipantType
def tracker_url(tracker):
@ -62,7 +62,7 @@ def label_search_url(label, terms=""):
terms += " " + label_term
return "{}?search={}".format(
tracker_url(label.tracker),
unicode_urlencode(terms))
url_quote(terms))
def label_add_url(ticket):
"""Return the URL to add a label to a ticket."""