javadoc fixes
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
35f0c6f6ca
commit
6410b62b3c
|
@ -60,7 +60,7 @@
|
|||
import org.apache.commons.lang.exception.NestableRuntimeException;
|
||||
|
||||
/**
|
||||
* <p>Escapes and unescapes <code>String</code>s for Java, Java Script, HTML, and XML.
|
||||
* <p>Escapes and unescapes <code>String</code>s for Java, Java Script, HTML, XML, and SQL.
|
||||
*
|
||||
* <p>Originally from
|
||||
* <a href="http://jakarta.apache.org/turbine/">Turbine</a> and the
|
||||
|
@ -75,7 +75,7 @@
|
|||
* @author <a href="sean@boohai.com">Sean Brown</a>
|
||||
* @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a>
|
||||
* @since 2.0
|
||||
* @version $Id: StringEscapeUtils.java,v 1.14 2003/07/05 19:04:31 bayard Exp $
|
||||
* @version $Id: StringEscapeUtils.java,v 1.15 2003/07/05 23:37:30 alex Exp $
|
||||
*/
|
||||
public class StringEscapeUtils {
|
||||
|
||||
|
@ -427,8 +427,8 @@ public static String escapeHtml(String str) {
|
|||
* <p>Unescapes a string containing entity escapes to a string
|
||||
* containing the actual Unicode characters corresponding to the
|
||||
* escapes. Supports HTML 4.0 entities.</p>
|
||||
* <p>For example, the string "&lt;Françla;ais&gt;"
|
||||
* will become "<Fran\u00E7ais>"</p>
|
||||
* <p>For example, the string "&lt;Fran&ccedil;ais&gt;"
|
||||
* will become "<Français>"</p>
|
||||
* <p>If an entity is unrecognized, it is left alone, and inserted
|
||||
* verbatim into the result string. e.g. "&gt;&zzzz;x" will
|
||||
* become ">&zzzz;x".</p>
|
||||
|
@ -480,11 +480,13 @@ public static String unescapeXml(String str) {
|
|||
/**
|
||||
* Escapes the characters in a <code>String</code> to be suitable to pass to
|
||||
* an SQL query. For example,
|
||||
* <code>statement.executeQuery("SELECT * FROM MOVIES WHERE TITLE='" + StringEscapeUtils.escapeSql("McHale's Navy") + "'");</code>
|
||||
* Presently, this method only turns single-quotes into doubled single-quotes.
|
||||
* <pre>statement.executeQuery("SELECT * FROM MOVIES WHERE TITLE='" +
|
||||
* StringEscapeUtils.escapeSql("McHale's Navy") +
|
||||
* "'");</pre>
|
||||
* At present, this method only turns single-quotes into doubled single-quotes (<code>"McHale's Navy"</code> => <code>"McHale''s Navy"</code>).
|
||||
* It does not handle the cases of percent (%) or underscore (_) for use in LIKE clauses.
|
||||
* see http://www.jguru.com/faq/view.jsp?EID=8881
|
||||
* @param s
|
||||
* @param s the string to escape
|
||||
* @return A new String, escaped for SQL
|
||||
*/
|
||||
public static String escapeSql(String s)
|
||||
|
|
Loading…
Reference in New Issue