I was wrong, html escape filter is appended even if an html escape filter is already there.
This commit is contained in:
@@ -4,5 +4,5 @@ HTML Escaping
|
||||
Dust automatically applies the `|h` filter to html escape unless `|s` is applied to disable automatic html escaping. It seems that if you manually specify `|h` and `|s` in the same filter, then it still html escapes, so my theory on the logic is:
|
||||
|
||||
Iterate over all filters
|
||||
If `|s` or `|h` is not present append `|h`, otherwise, leave filters as-in
|
||||
If `|s` is not present append `|h`, otherwise, leave filters as-in
|
||||
During render, `|s` does nothing, so we can just remove it on the dust side to prevent confusion.
|
||||
|
||||
@@ -2,6 +2,7 @@ Special characters: {special_characters}{~n}
|
||||
Special characters html escaping disabled: {special_characters|s}{~n}
|
||||
Special characters html escaping disabled and enabled: {special_characters|s|h}{~n}
|
||||
Special characters html escaping enabled and disabled: {special_characters|h|s}{~n}
|
||||
Special characters html escaped once: {special_characters|h}{~n}
|
||||
Special characters html escaped twice: {special_characters|h|h}{~n}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user