1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: escape form key, not only value. (#6269)

This commit is contained in:
florin 2020-08-30 13:09:12 -04:00 committed by GitHub
parent ea31c2a643
commit b1a8e1e5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -494,7 +494,9 @@ fn (mut ctx Context) parse_form(s string) {
}
keyval := word.trim_space().split('=')
if keyval.len != 2 { continue }
key := keyval[0]
key := urllib.query_unescape(keyval[0]) or {
continue
}
val := urllib.query_unescape(keyval[1]) or {
continue
}