summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-04-15 13:04:51 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-04-15 13:04:51 +0200
commit6c593e5b3249cf438979c46ed9382fdec34ea460 (patch)
tree430b6287d65c1c8d4c2d79288a2206adcfe7353e /core
parentb8511f48357298498a38f37c52eb34b80da2c1ce (diff)
downloadnextcloud-server-6c593e5b3249cf438979c46ed9382fdec34ea460.tar.gz
nextcloud-server-6c593e5b3249cf438979c46ed9382fdec34ea460.zip
Make sure we have a proper node before parsing
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/js/files/iedavclient.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/js/files/iedavclient.js b/core/js/files/iedavclient.js
index 4e2c17abc55..ecf1d1bb660 100644
--- a/core/js/files/iedavclient.js
+++ b/core/js/files/iedavclient.js
@@ -82,6 +82,11 @@
var parts = name.split(':');
var tagName = parts[1];
var namespace = resolver(parts[0]);
+ // make sure we can get elements
+ if (typeof node === 'string') {
+ var parser = new DOMParser()
+ node = parser.parseFromString(node, 'text/xml')
+ }
if (node.getElementsByTagNameNS) {
return node.getElementsByTagNameNS(namespace, tagName);
}