-1

I have data in this format <b><i>testing </i> </b> and I need to convert this string into an equivalent java string. Can anyone suggest the process? Thank you

Foo L
  • 10,656
  • 8
  • 38
  • 49
Nagarjun
  • 27
  • 6
  • 1
    Do you want to remove the special character ?? – Kick Jan 28 '14 at 07:46
  • see http://stackoverflow.com/questions/18471500/how-can-i-add-escape-characters-to-a-java-string for escaping quotes – chro Jan 28 '14 at 07:48
  • no when i enter any data in my application i will save in escape formant that is for < it will save as &ls like that – Nagarjun Jan 28 '14 at 08:43

1 Answers1

0

try this :

 import static org.apache.commons.lang.StringEscapeUtils.escapeHtml;
// ...
String source = "<b><i>testing </i> </b>";
String escaped = escapeHtml(source);
Salah
  • 8,304
  • 3
  • 24
  • 41