Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.8
-
None
-
None
Description
Escaping special characters by using Text.escapeIllegalXpathSearchChars works only on last special character.
fullText = "Moving to Alabama? Start Off on the Left Foot!";
println Text.escapeIllegalXpathSearchChars(fullText);
Moving to Alabama? Start Off on the Left Foot!
fullText = "Moving to Alabama! Start Off on the Left Foot!";
println Text.escapeIllegalXpathSearchChars(fullText);
Moving to Alabama! Start Off on the Left Foot!
fullText = "Moving to Alabama! Start Off on the Left Foot?";
println Text.escapeIllegalXpathSearchChars(fullText);
Moving to Alabama! Start Off on the Left Foot?
And such partially escaped string cannot be used in full text search in JCR it doesn't throw errors but also doesn't return any nodes