Skip to content

Commit

Permalink
Fixing nfarina#29 - Incorrect escaping of < >
Browse files Browse the repository at this point in the history
  • Loading branch information
buholzer committed Apr 23, 2016
1 parent 48c1b3b commit 1db15c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xmldoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function extend(destination, source) {

// escapes XML entities like "<", "&", etc.
function escapeXML(value){
return value.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/&/g, '&amp;').replace(/'/g, '&apos;').replace(/"/g, '&quot;');
return value.replace(/&/g, '&amp;').replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, '&apos;').replace(/"/g, '&quot;');
}

// Are we being used in a Node-like environment?
Expand Down

0 comments on commit 1db15c0

Please sign in to comment.