[Pkg-mozext-commits] [firexpath] 29/51: 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
Sun Mar 22 15:08:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firexpath.
commit 18a24ada2057c47d60d8ac81da84d50853f0511a
Author: pierre.tholence at gmail.com <pierre.tholence at gmail.com@dfa30af4-1965-11df-8728-136f2c2ca76e>
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.
git-svn-id: http://firepath.googlecode.com/svn/trunk@35 dfa30af4-1965-11df-8728-136f2c2ca76e
---
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