Reputation: 20078
where can i find this class StringEscapeUtils
that can automatically escape the characters instead of manualy doing... on my search i found the util called StringEscapeUtils
but i could not find in my project or i try to download from net but could not find too... is there a way i can make that automated something like this:
String testStr = "< > \" &";
System.out.println("Escaped : " + StringEscapeUtils.escapeHtml(testStr));
Upvotes: 2
Views: 36537
Reputation: 793
I think you're looking for: org.apache.commons.lang.StringEscapeUtils
See:
http://commons.apache.org/lang/
http://commons.apache.org/lang/api/org/apache/commons/lang3/StringEscapeUtils.html
http://commons.apache.org/lang/api/src-html/org/apache/commons/lang3/StringEscapeUtils.html
Upvotes: 1
Reputation: 7961
You need to download the Apache Commons Lang library and include it in your project as a referenced library.
Upvotes: 5
Reputation: 13139
org.apache.commons.lang.StringEscapeUtils is a part of the Apache Commons Lang package.
Upvotes: 1