commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (LANG-1019) StringEscapeUtils.escapeXPath()
Date Sun, 22 Jun 2014 21:00:25 GMT


Sebb commented on LANG-1019:

That should work, but is not very efficient if the input contains multiple single-quotes.

But this still seems out of scope. The escapeXml/Html methods are more generally useful.
This can only be used in XPath where a funtion call (concat) is usable.

> StringEscapeUtils.escapeXPath()
> -------------------------------
>                 Key: LANG-1019
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.*
>    Affects Versions: 3.3.2
>            Reporter: Yegor Bugayenko
> Would be great to create a method that would escape a string for XPath. It is a well
known problem that XPath doesn't have a mechanism for quotes escaping. See for example
> A very good workaround suggested here
> Would be great to add a method to StringEscapeUtils

This message was sent by Atlassian JIRA

View raw message