Skip to content

Commit

Permalink
dont escape too much &
Browse files Browse the repository at this point in the history
  • Loading branch information
dodo committed Oct 22, 2011
1 parent 7fc9f07 commit f72833a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xml.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Tag extends EventEmitter
write: (content, {escape} = {}) =>
if escape
content = String(content)
.replace(/&/g, '&')
.replace(/&(?!\w+;)/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
Expand Down

0 comments on commit f72833a

Please sign in to comment.