[Pkg-mozext-commits] [firexpath] 01/04: Issue23: fix a bug introduced by Issue15. We no longer lower case the literal inside an XPath expression because they are case sensitive.
David Prévot
taffit at moszumanska.debian.org
Sat Mar 26 19:35:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag FirePath-0.9.6.1
in repository firexpath.
commit 8cf798bd16f9a8ddc31f3f89215cc01a9e21b38e
Author: pierre.tholence <pierre.tholence at gmail.com>
Date: Wed Mar 23 23:21:02 2011 +0000
Issue23: fix a bug introduced by Issue15. We no longer lower case the literal inside an XPath expression because they are case sensitive.
---
content/bindings.xml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/content/bindings.xml b/content/bindings.xml
index c416f11..cac768e 100644
--- a/content/bindings.xml
+++ b/content/bindings.xml
@@ -339,7 +339,10 @@
<body><![CDATA[
try {
if (xPath && FBL.isHtmlDocument(this.FirePathPanel.location.document)) {
- xPath = xPath.toLowerCase();
+ // we want to lower case the XPath expression but not the literal inside.
+ // eg: //DIV[@id='TEST'] should become //div[@id='TEST']
+ xPath = xPath.replace(/([^']*)('[^']+')?/g,
+ function(str, expression, literal){return expression.toLowerCase() + literal;});
}
return this.xPathEvaluator.createExpression(xPath, this.NSResolver);
} catch (e) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firexpath.git
More information about the Pkg-mozext-commits
mailing list