|
@ -2,6 +2,7 @@ package main |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"github.com/microcosm-cc/bluemonday" |
|
|
"github.com/microcosm-cc/bluemonday" |
|
|
|
|
|
"html" |
|
|
"net/http" |
|
|
"net/http" |
|
|
"net/url" |
|
|
"net/url" |
|
|
) |
|
|
) |
|
@ -33,9 +34,9 @@ func sanitizeForm(values url.Values) FormValues { |
|
|
for key, values := range values { |
|
|
for key, values := range values { |
|
|
var sanitizedValues []string |
|
|
var sanitizedValues []string |
|
|
for _, value := range values { |
|
|
for _, value := range values { |
|
|
sanitizedValues = append(sanitizedValues, p.Sanitize(value)) |
|
|
|
|
|
|
|
|
sanitizedValues = append(sanitizedValues, html.UnescapeString(p.Sanitize(value))) |
|
|
} |
|
|
} |
|
|
sanitizedForm[p.Sanitize(key)] = sanitizedValues |
|
|
|
|
|
|
|
|
sanitizedForm[html.UnescapeString(p.Sanitize(key))] = sanitizedValues |
|
|
} |
|
|
} |
|
|
return sanitizedForm |
|
|
return sanitizedForm |
|
|
} |
|
|
} |
|
|