mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/rest: unescape percent-encoded route parameters
for routes that address things by name instead of ID, e.g. /tag/tagname, where we allow special characters, we need to unescape the values.
This commit is contained in:
@ -101,7 +101,7 @@ def application(
|
||||
for hook in middleware.pre_hooks:
|
||||
hook(ctx)
|
||||
try:
|
||||
response = handler(ctx, match.groupdict())
|
||||
response = handler(ctx, {k: urllib.parse.unquote(v) for k, v in match.groupdict().items()})
|
||||
except Exception:
|
||||
ctx.session.rollback()
|
||||
raise
|
||||
|
Reference in New Issue
Block a user