Преглед изворни кода

Merge branch 'MShwed-bugs/xpath-namespace-prefix-fix'

n1474335 пре 6 година
родитељ
комит
90ddc2bfa7
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/operations/XPathExpression.mjs

+ 1 - 1
src/core/operations/XPathExpression.mjs

@@ -57,7 +57,7 @@ class XPathExpression extends Operation {
 
 
         let nodes;
         let nodes;
         try {
         try {
-            nodes = xpath.select(query, doc);
+            nodes = xpath.parse(query).select({ node: doc, allowAnyNamespaceForNoPrefix: true });
         } catch (err) {
         } catch (err) {
             throw new OperationError(`Invalid XPath. Details:\n${err.message}.`);
             throw new OperationError(`Invalid XPath. Details:\n${err.message}.`);
         }
         }