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

sql: only accept strings and ints for now

This commit is contained in:
Alexander Medvednikov
2019-08-12 18:54:28 +03:00
parent cba4d59712
commit ef2ab31e88
4 changed files with 54 additions and 19 deletions

View File

@@ -5,6 +5,7 @@ import (
strings
net
http
net.urllib
)
const (
@@ -172,7 +173,9 @@ fn (ctx mut Context) parse_form(s string) {
keyval := word.trim_space().split('=')
if keyval.len != 2 { continue }
key := keyval[0]
val := http.unescape_url(keyval[1])
val := urllib.query_unescape(keyval[1]) or {
continue
}
println('http form "$key" => "$val"')
ctx.form[key] = val
}