I was wrong, html escape filter is appended even if an html escape filter is already there.
This commit is contained in:
@@ -510,10 +510,7 @@ impl<'a> DustRenderer<'a> {
|
||||
|
||||
// If the user has not specified any escaping filter (|s or
|
||||
// |h), automatically add an html escape filter
|
||||
if !filters
|
||||
.iter()
|
||||
.any(|f| f == &Filter::DisableHtmlEncode || f == &Filter::HtmlEncode)
|
||||
{
|
||||
if !filters.iter().any(|f| f == &Filter::DisableHtmlEncode) {
|
||||
final_filters.push(Filter::HtmlEncode);
|
||||
}
|
||||
final_filters
|
||||
|
||||
Reference in New Issue
Block a user