Skip to content

Commit

Permalink
Escape numbered HTML entities
Browse files Browse the repository at this point in the history
  • Loading branch information
chowey committed May 4, 2012
1 parent 47bab06 commit b771df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/runtime.js
Expand Up @@ -85,7 +85,7 @@ exports.attrs = function attrs(obj, escaped){

exports.escape = function escape(html){
return String(html)
.replace(/&(?!\w+;)/g, '&')
.replace(/&(?!(\w+|\#\d+);)/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
Expand Down

0 comments on commit b771df5

Please sign in to comment.