Skip to content

Commit

Permalink
Decode all URL params no matter what
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasTJdev authored and dom96 committed May 25, 2023
1 parent 88dad03 commit 053d62c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jester.nim
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ template `@`*(s: string): untyped =
# TODO: Why does request.params not work? :(
# TODO: This is some weird bug with macros/templates, I couldn't
# TODO: reproduce it easily.
decodeUrl(params(request)[s])
params(request)[s]
else:
""

Expand Down
2 changes: 1 addition & 1 deletion jester/request.nim
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ proc params*(req: Request): Table[string, string] =

try:
for key, val in cgi.decodeData(query):
result[key] = val
result[key] = decodeUrl(val)
except CgiError:
logging.warn("Incorrect query. Got: $1" % [query])

Expand Down

0 comments on commit 053d62c

Please sign in to comment.