Author: lektran
Date: Fri May 14 09:47:27 2010
New Revision: 944180
URL:
http://svn.apache.org/viewvc?rev=944180&view=revLog:
The following deprecated methods have been removed from org.ofbiz.base.util.StringUtil:
htmlSpecialChars(String)
- Use StringUtil.HtmlEncoder.encode(String) instead
Modified:
ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=944180&r1=944179&r2=944180&view=diff==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java Fri May 14 09:47:27 2010
@@ -596,35 +596,6 @@ public class StringUtil {
}
/**
- * Translates various HTML characters in a string so that the string can be displayed in a browser safely
- * <p>
- * This function is useful in preventing user-supplied text from containing HTML markup, such as in a message board or
- * guest book application.
- * </p>
- * The translations performed are: <ol>
- * <li>'&' (ampersand) becomes '&'
- * <li>'"' (double quote) becomes '"'
- * <li>''' (single quote) becomes '''
- * <li>'<' (less than) becomes '<'
- * <li>'>' (greater than) becomes '>'
- * <li>\n (Carriage Return) becomes '<br>gt;'
- * </ol>
- *
- * @deprecated Use StringUtil.htmlEncoder instead.
- */
- @Deprecated
- public static String htmlSpecialChars(String html) {
- html = StringUtil.replaceString(html, "&", "&");
- html = StringUtil.replaceString(html, "<", "<");
- html = StringUtil.replaceString(html, ">", ">");
- html = StringUtil.replaceString(html, "\"", """);
- html = StringUtil.replaceString(html, "'", "'");
- html = StringUtil.replaceString(html, "\n", "<br>");
-
- return html;
- }
-
- /**
* Remove/collapse multiple newline characters
*
* @param str string to collapse newlines in