Closed raffazizzi closed 8 years ago
Parsing an XPath expression with an attribute name containing a dot returns Uncaught Error: Unexpected token beyond end of query.
Uncaught Error: Unexpected token beyond end of query
For example:
xml_element.xpath("@meter.count");
Plain jquery attr() works correctly:
attr()
xml_element.attr("meter.count");
Dots are allowed as part of an XML Name, just not at the beginning, so the expression parser should allow them.
The same issue applies to element names.
Fixed in ilinsky/xpath.js@ac494f675c5693e6803c3a502d0cdbf7fe859a1f
Parsing an XPath expression with an attribute name containing a dot returns
Uncaught Error: Unexpected token beyond end of query
.For example:
Plain jquery
attr()
works correctly:Dots are allowed as part of an XML Name, just not at the beginning, so the expression parser should allow them.
The same issue applies to element names.