Skip to content

Commit

Permalink
Merge pull request #286 from Rycochet/patch-1
Browse files Browse the repository at this point in the history
Fix Valid characters in XML (allow \n and \r when saving)
  • Loading branch information
guyonroche authored Mar 16, 2017
2 parents a1eb8f1 + c0e7711 commit a2d2ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var utils = module.exports = {
return path.path + '/_rels/' + path.name + '.rels';
},
xmlEncode: function(text) {
return text.replace(/[<>&'"\x7F\x00-\x1F]/g, function (c) {
return text.replace(/[<>&'"\x7F\x00-\x08\x0A-\x0C\x0E-\x1F]/g, function (c) {
switch (c) {
case '<': return '&lt;';
case '>': return '&gt;';
Expand Down

0 comments on commit a2d2ce6

Please sign in to comment.