mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
e15a18e9fb
commit
49cc12f99d
5 changed files with 11 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue