Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

escape '&' in rendered html attributes

  • Loading branch information...
commit 117ae294aceeda5c1ce7257cdb96e32abf714a73 1 parent ada528f
@mmckegg authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  shared/generate_html.js
View
2  shared/generate_html.js
@@ -91,7 +91,7 @@ function isSelfClosing(name){
}
function escapeAttribute(attribute){
- return attribute || attribute === 0 ? attribute.toString().replace(/"/g, '"') : '';
+ return attribute || attribute === 0 ? escapeHTML(attribute.toString().replace(/"/g, '"')) : '';
}
function escapeHTML(s) {
return s ? s.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;') : '';
Please sign in to comment.
Something went wrong with that request. Please try again.