Closed dz4k closed 10 months ago
Hi @dz4k Looks like there're some conflicts due the latest changes in the documentation. Can you fix them? I also left a couple of suggestions to simplify your changes. Let me know if you have any question. Thanks!
@oscarotero just got around to making those changes. Any final verdict on the filter name? maybe noescape
or trust
, or stick with safe
?
BTW:
because you may want to escape non-HTML code.
It would be cool if the autoescape
filter accepted an escaping function, so we could use Vento for templating other kinds of files without causing syntax errors -- maybe a future feature
Any final verdict on the filter name? maybe noescape or trust, or stick with safe?
noescape
is confusing because you can combine it with escape
filter: {{ string | escape | noescape }}
.
If you don't like safe
, I'm okay with trust
(it's also short).
Let me know if you want to change it and when can I merge this.
It would be cool if the autoescape filter accepted an escaping function,
Maybe this function can be configurable in the options:
const env = vento({
autoescape: true, // use the default function
});
const env = vento({
autoescape: (string) => string, // use a custom function
});
safe
is fine, feel free to merge
Great. Thanks!
Per Discord discussion:
Note: I never liked the
safe
name but it might be better to keep it for familiarity.