jinja2: rename filter 'urlencode' to 'quote_plus'

urlencode does more than just a quote_plus. Using urlencode
was not sensible, so this commit addresses that.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2021-08-20 14:44:36 -07:00
parent e15a18e9fb
commit 49cc12f99d
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
5 changed files with 11 additions and 8 deletions

View file

@ -31,7 +31,7 @@ _env.filters["tn"] = l10n.tn
_env.filters["dt"] = util.timestamp_to_datetime
_env.filters["as_timezone"] = util.as_timezone
_env.filters["dedupe_qs"] = util.dedupe_qs
_env.filters["urlencode"] = quote_plus
_env.filters["quote_plus"] = quote_plus
_env.filters["get_vote"] = util.get_vote
_env.filters["number_format"] = util.number_format

View file

@ -1,4 +1,5 @@
import base64
import logging
import math
import random
import re
@ -18,6 +19,8 @@ from jinja2 import pass_context
import aurweb.config
logger = logging.getLogger(__name__)
def make_random_string(length):
return ''.join(random.choices(string.ascii_lowercase