Skip to content

Commit 053d62c

Browse files
ThomasTJdevdom96
authored andcommitted
Decode all URL params no matter what
1 parent 88dad03 commit 053d62c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

jester.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ template `@`*(s: string): untyped =
700700
# TODO: Why does request.params not work? :(
701701
# TODO: This is some weird bug with macros/templates, I couldn't
702702
# TODO: reproduce it easily.
703-
decodeUrl(params(request)[s])
703+
params(request)[s]
704704
else:
705705
""
706706

jester/request.nim

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ proc params*(req: Request): Table[string, string] =
105105

106106
try:
107107
for key, val in cgi.decodeData(query):
108-
result[key] = val
108+
result[key] = decodeUrl(val)
109109
except CgiError:
110110
logging.warn("Incorrect query. Got: $1" % [query])
111111

0 commit comments

Comments
 (0)