diff --git a/helpers/nonce.js b/helpers/nonce.js index fa90c4d..64e5fd9 100644 --- a/helpers/nonce.js +++ b/helpers/nonce.js @@ -4,7 +4,7 @@ const factory = globals => { return function() { const params = globals.getRequestParams(); if (params && params.security && params.security.nonce) { - return ` nonce="${params.security.nonce}"`; + return new globals.handlebars.SafeString(` nonce="${params.security.nonce}"`); } return '' }; diff --git a/spec/helpers/nonce.js b/spec/helpers/nonce.js index 8a3b788..4ab225c 100644 --- a/spec/helpers/nonce.js +++ b/spec/helpers/nonce.js @@ -17,7 +17,7 @@ describe('nonce helper', function () { runTestCases([ { input: '{{nonce}}', - output: ' nonce="' + requestParams.security.nonce + '"', + output: ' nonce="' + requestParams.security.nonce + '"', }, ], done); });