svn commit: r944180 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r944180 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/StringUtil.java

lektran
Author: lektran
Date: Fri May 14 09:47:27 2010
New Revision: 944180

URL: http://svn.apache.org/viewvc?rev=944180&view=rev
Log:
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 '&amp;'
-     *    <li>'"' (double quote) becomes '&quot;'
-     *    <li>''' (single quote) becomes '&#039;'
-     *    <li>'<' (less than) becomes '&lt;'
-     *    <li>'>' (greater than) becomes '&gt;'
-     *    <li>\n (Carriage Return) becomes '&lt;br&gt;gt;'
-     * </ol>
-     *
-     * @deprecated Use StringUtil.htmlEncoder instead.
-     */
-    @Deprecated
-    public static String htmlSpecialChars(String html) {
-        html = StringUtil.replaceString(html, "&", "&amp;");
-        html = StringUtil.replaceString(html, "<", "&lt;");
-        html = StringUtil.replaceString(html, ">", "&gt;");
-        html = StringUtil.replaceString(html, "\"", "&quot;");
-        html = StringUtil.replaceString(html, "'", "&#039");
-        html = StringUtil.replaceString(html, "\n", "<br>");
-
-        return html;
-    }
-
-    /**
      * Remove/collapse multiple newline characters
      *
      * @param str string to collapse newlines in