vweb: more xss fixes

pull/5491/head
Alexander Medvednikov 2020-06-24 22:38:25 +02:00
parent 83b300435a
commit bb5793d485
1 changed files with 6 additions and 1 deletions

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