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

vweb: more xss fixes

This commit is contained in:
Alexander Medvednikov 2020-06-24 22:38:25 +02:00
parent 83b300435a
commit bb5793d485

View File

@ -413,7 +413,12 @@ pub fn not_found() Result {
}
fn filter(s string) string {
return s.replace('<', '&lt;')
return s.replace_each([
'<', '&lt;',
'"', '&quot;',
'&', '&amp;',
])
}
pub type RawHtml = string