Skip to content

Commit

Permalink
new tag regex handles angle brackets in attributes
Browse files Browse the repository at this point in the history
fixes #768
  • Loading branch information
Hugh Greenish authored and SheetJSDev committed Aug 8, 2017
1 parent d443860 commit 54f380e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bits/22_xmlutils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var attregexg=/([^"\s?>\/]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g;
var tagregex=/<[^>]*>/g;
var tagregex=/<[\/\?]?[a-zA-Z0-9:]+(?:\s+[^"\s?>\/]+=(?:"[^"]*"|'[^']*'|[^'">\s]+))*\s?[\/\?]?>/g;
var nsregex=/<\w*:/, nsregex2 = /<(\/?)\w+:/;
function parsexmltag(tag/*:string*/, skip_root/*:?boolean*/)/*:any*/ {
var z = ({}/*:any*/);
Expand Down
2 changes: 1 addition & 1 deletion xlsx.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ function resolve_path(path/*:string*/, base/*:string*/)/*:string*/ {
return result.join('/');
}
var attregexg=/([^"\s?>\/]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g;
var tagregex=/<[^>]*>/g;
var tagregex=/<[\/\?]?[a-zA-Z0-9:]+(?:\s+[^"\s?>\/]+=(?:"[^"]*"|'[^']*'|[^'">\s]+))*\s?[\/\?]?>/g;
var nsregex=/<\w*:/, nsregex2 = /<(\/?)\w+:/;
function parsexmltag(tag/*:string*/, skip_root/*:?boolean*/)/*:any*/ {
var z = ({}/*:any*/);
Expand Down
2 changes: 1 addition & 1 deletion xlsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ function resolve_path(path, base) {
return result.join('/');
}
var attregexg=/([^"\s?>\/]+)=((?:")([^"]*)(?:")|(?:')([^']*)(?:')|([^'">\s]+))/g;
var tagregex=/<[^>]*>/g;
var tagregex=/<[\/\?]?[a-zA-Z0-9:]+(?:\s+[^"\s?>\/]+=(?:"[^"]*"|'[^']*'|[^'">\s]+))*\s?[\/\?]?>/g;
var nsregex=/<\w*:/, nsregex2 = /<(\/?)\w+:/;
function parsexmltag(tag, skip_root) {
var z = ({});
Expand Down

0 comments on commit 54f380e

Please sign in to comment.