Implemented the json stringify and parse filters.

This commit is contained in:
Tom Alexander
2020-05-23 18:14:23 -04:00
parent 624c83b680
commit e22bffd2ba
3 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
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
During render, `|s` does nothing, so we can just remove it on the dust side to prevent confusion.