escape text in ssr
This commit is contained in:
1 parent
bea16f151f
commit
c9f9b8b0fa
3 files changed
+13
-3
No files matched your search
@@ -104,8 +104,11 @@ impl Renderer {
|
||||
write!(buf, "<!--#-->")?;
|
||||
}
|
||||
|
||||
// todo: escape the text
|
||||
write!(buf, "{}", text.value)?;
|
||||
write!(
|
||||
buf,
|
||||
"{}",
|
||||
askama_escape::escape(text.value, askama_escape::Html)
|
||||
)?;
|
||||
|
||||
if self.pre_render {
|
||||
write!(buf, "<!--#-->")?;
|
||||
|
||||
Reference in new issue
Block a user