]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure we have a proper node before parsing 15110/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Mon, 15 Apr 2019 11:04:51 +0000 (13:04 +0200)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Mon, 15 Apr 2019 11:04:51 +0000 (13:04 +0200)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
core/js/files/iedavclient.js

index 4e2c17abc55196c9a7a0a68e4ea1a35912658fb0..ecf1d1bb6608f87bd191a68a3c41ed9d1deed7d4 100644 (file)
                        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);
                        }