Skip to content

Commit

Permalink
Backport potential xss fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CalebFenton committed Nov 21, 2015
1 parent 61b1663 commit 4a7b034
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions spec/dummy/vendor/assets/javascripts/handlebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,17 @@ var __module3__ = (function(__dependency1__) {
">": ">",
'"': """,
"'": "'",
"`": "`"
};

var badChars = /[&<>"'`]/g;
var possible = /[&<>"'`]/;

'`': '&#x60;',
'\n' : '\\n', // NewLine
'\r' : '\\n', // Return
'\b' : '\\b', // Backspace
'\f' : '\\f', // Form fee
'\t' : '\\t', // Tab
'\v' : '\\v' // Vertical Tab
};
var badChars = /[&<>"'`\b\f\n\r\t\v]/g;
var possible = /[&<>"'`\b\f\n\r\t\v]/;

function escapeChar(chr) {
return escape[chr];
}
Expand Down

0 comments on commit 4a7b034

Please # to comment.