[jira] [Commented] (LANG-1010) StringEscapeUtils escapeXml escapes already escaped characters

2015-07-19 Thread Henri Yandell (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14632742#comment-14632742
 ] 

Henri Yandell commented on LANG-1010:
-

Thinking out loud, you could create a customer translator (subclass of 
CharSequenceTranslator). If the letter was an , you would look ahead to 
determine if it was a valid escaped character. If so you would write them out 
and return the size of what you wrote.

Then you would create an AggregateTranslator around your custom translator and 
StringEscapeUtils.ESCAPE_XML11.

 StringEscapeUtils escapeXml escapes already escaped characters
 --

 Key: LANG-1010
 URL: https://issues.apache.org/jira/browse/LANG-1010
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.*
Affects Versions: 3.3
Reporter: Kaushal Kumar

 StringEscapeUtils escapeXml escapes already escaped characters.
 Is there a way to enhance this API to check if the character is not escaped 
 only then escape the character.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (LANG-1010) StringEscapeUtils escapeXml escapes already escaped characters

2015-07-19 Thread Henri Yandell (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-1010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14632857#comment-14632857
 ] 

Henri Yandell commented on LANG-1010:
-

A bit sloppy, but I was thinking of something akin to not escaping an  when it 
forms the start of one of /[a-zA-Z0-9]*;/ and /#[0-9]*;/

Agreed that the caller should typically provide unescaped Strings.

 StringEscapeUtils escapeXml escapes already escaped characters
 --

 Key: LANG-1010
 URL: https://issues.apache.org/jira/browse/LANG-1010
 Project: Commons Lang
  Issue Type: New Feature
  Components: lang.*
Affects Versions: 3.3
Reporter: Kaushal Kumar

 StringEscapeUtils escapeXml escapes already escaped characters.
 Is there a way to enhance this API to check if the character is not escaped 
 only then escape the character.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)