Skip to content

Commit 3a44394

Browse files
committed
.
1 parent fc0c5a0 commit 3a44394

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

processing.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5205,8 +5205,8 @@ module.exports = function(options, undef) {
52055205
this.lineNr = line;
52065206
}
52075207
} else {
5208-
// XMLElement(this,file) format
5209-
this.parse(uri);
5208+
// XMLElement(this, file uri) format
5209+
this.parse(uri, true);
52105210
}
52115211
}
52125212
};
@@ -5228,11 +5228,11 @@ module.exports = function(options, undef) {
52285228
*
52295229
* @see XMLElement#parseChildrenRecursive
52305230
*/
5231-
parse: function(textstring) {
5231+
parse: function(textstring, stringIsURI) {
52325232
var xmlDoc;
52335233
try {
52345234
var extension = textstring.substring(textstring.length-4);
5235-
if (extension === ".xml" || extension === ".svg") {
5235+
if (stringIsURI) {
52365236
textstring = ajax(textstring);
52375237
}
52385238
xmlDoc = new DOMParser().parseFromString(textstring, "text/xml");

processing.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Objects/XMLElement.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ module.exports = function(options, undef) {
4343
this.lineNr = line;
4444
}
4545
} else {
46-
// XMLElement(this,file) format
47-
this.parse(uri);
46+
// XMLElement(this, file uri) format
47+
this.parse(uri, true);
4848
}
4949
}
5050
};
@@ -66,11 +66,11 @@ module.exports = function(options, undef) {
6666
*
6767
* @see XMLElement#parseChildrenRecursive
6868
*/
69-
parse: function(textstring) {
69+
parse: function(textstring, stringIsURI) {
7070
var xmlDoc;
7171
try {
7272
var extension = textstring.substring(textstring.length-4);
73-
if (extension === ".xml" || extension === ".svg") {
73+
if (stringIsURI) {
7474
textstring = ajax(textstring);
7575
}
7676
xmlDoc = new DOMParser().parseFromString(textstring, "text/xml");

0 commit comments

Comments
 (0)