I was wrong, html escape filter is appended even if an html escape filter is already there.

This commit is contained in:
Tom Alexander
2020-05-23 18:18:59 -04:00
parent e22bffd2ba
commit f3fef17d4b
3 changed files with 3 additions and 5 deletions

View File

@@ -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