summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-04-15 14:07:09 +0200
committerGitHub <noreply@github.com>2019-04-15 14:07:09 +0200
commit8d4866c316251291262fd452cca4d13dac87673f (patch)
treeffb610a5d0fc9bbeb257dbcc57c50efcbb19a3ee
parentcc8cee9e2cf0be7e4765724371d01212da99d1aa (diff)
parent6c593e5b3249cf438979c46ed9382fdec34ea460 (diff)
downloadnextcloud-server-8d4866c316251291262fd452cca4d13dac87673f.tar.gz
nextcloud-server-8d4866c316251291262fd452cca4d13dac87673f.zip
Merge pull request #15110 from nextcloud/fix/iedavclient/node-parser
Make sure we have a proper node before parsing
-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);
}