escape text in ssr
This commit is contained in:
1 parent
bea16f151f
commit
c9f9b8b0fa
3 files changed
+13
-3
No files matched your search
@@ -82,7 +82,13 @@ impl StringCache {
|
||||
}
|
||||
cur_path.pop();
|
||||
}
|
||||
TemplateNode::Text { text } => write!(chain, "{text}")?,
|
||||
TemplateNode::Text { text } => {
|
||||
write!(
|
||||
chain,
|
||||
"{}",
|
||||
askama_escape::escape(text, askama_escape::Html)
|
||||
)?;
|
||||
}
|
||||
TemplateNode::Dynamic { id: idx } | TemplateNode::DynamicText { id: idx } => {
|
||||
chain.segments.push(Segment::Node(*idx))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user