Skip to content

Commit 3cfb411

Browse files
author
Mario Tosso
authoredDec 10, 2020
Merge pull request #88 from Testlio/feature/new-escape-function-for-velocity
add native escape function for velocity templates
2 parents cd0a7b6 + 10f3ba0 commit 3cfb411

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎lib/helpers/api-gateway-mapping-parser.js

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ module.exports = function(template, params, context, payload, stageVariables) {
3030
return _.isString(value) ? value.replace(/\\([\s\S])|(")/g, "\\$1$2") : null;
3131
},
3232

33+
escape: function(value) {
34+
return _.isString(value) ? escape(value) : null;
35+
},
36+
3337
parseJson: function(string) {
3438
return JSON.parse(string);
3539
},

0 commit comments

Comments
 (0)
Please sign in to comment.