diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-04-15 23:10:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-15 23:10:06 +0200 |
commit | 9b6d4c4a4f625874f13418ab22e0cb5444935f6b (patch) | |
tree | 5ad882119a3b926792257a472b405baf92798c02 | |
parent | 8b2a3994a6e1760af42581658189b449dfc667e9 (diff) | |
parent | b3c390ea1e9c2691de77e2d0b83b91f565d5697d (diff) | |
download | nextcloud-server-9b6d4c4a4f625874f13418ab22e0cb5444935f6b.tar.gz nextcloud-server-9b6d4c4a4f625874f13418ab22e0cb5444935f6b.zip |
Merge pull request #15111 from nextcloud/backport/15110/stable16
[stable16] Make sure we have a proper node before parsing
-rw-r--r-- | core/js/files/iedavclient.js | 5 |
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); } |