|
From: <die...@us...> - 2012-02-27 10:38:07
|
Revision: 3740
http://openutils.svn.sourceforge.net/openutils/?rev=3740&view=rev
Author: diego_schivo
Date: 2012-02-27 10:37:56 +0000 (Mon, 27 Feb 2012)
Log Message:
-----------
CRIT-47 Hyphen escape
Modified Paths:
--------------
trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java
Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java
===================================================================
--- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2012-02-27 10:31:04 UTC (rev 3739)
+++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/jcr/query/xpath/utils/XPathTextUtils.java 2012-02-27 10:37:56 UTC (rev 3740)
@@ -133,6 +133,10 @@
{
encodedPath.append("_x" + StringUtils.leftPad(Integer.toHexString(ch), 4, '0') + "_");
}
+ else if (i > 0 && path.charAt(i - 1) == '/' && ch == '-')
+ {
+ encodedPath.append("_x002d_");
+ }
else if (inXpathCondition <= 0 && ch == ' ')
{
encodedPath.append("_x0020_");
@@ -141,10 +145,6 @@
{
encodedPath.append("_x002c_");
}
- else if (inXpathCondition <= 0 && ch == '-')
- {
- encodedPath.append("_x002d_");
- }
else
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|