Skip to content
Snippets Groups Projects
Verified Commit 8cde84e7 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix(transformer): add escape html

parent 53dd4614
No related branches found
No related tags found
No related merge requests found
......@@ -196,6 +196,17 @@ function transform(value) {
validateString(value);
return value.toLowerCase();
case "escape-html":
case "escapehtml":
validateString(value);
return value.replace(/&/g, "&").
replace(/</g, "&lt;").
replace(/>/g, "&gt;").
replace(/"/g, "&quot;").
replace(/'/g, '&#39;');
case "contains":
if (isString(value)) {
return value.includes(args[0]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment