1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 package org.dbforms.util;
25
26 import java.io.Serializable;
27
28 import org.dbforms.interfaces.IEscaper;
29 import org.apache.commons.lang.StringEscapeUtils;
30
31 /***
32 * DefaultEscaper
33 *
34 */
35 public class DefaultEscaperImpl implements IEscaper, Serializable {
36 /***
37 * DOCUMENT ME!
38 *
39 * @param s DOCUMENT ME!
40 *
41 * @return DOCUMENT ME!
42 */
43 public String escapeHTML(String s) {
44 return StringEscapeUtils.escapeHtml(s);
45 }
46
47 /***
48 * DOCUMENT ME!
49 *
50 * @param s DOCUMENT ME!
51 *
52 * @return DOCUMENT ME!
53 */
54 public String unescapeHTML(String s) {
55 return StringEscapeUtils.unescapeHtml(s);
56 }
57
58
59
60
61 /***
62 * DOCUMENT ME!
63 *
64 * @param s DOCUMENT ME!
65 *
66 * @return DOCUMENT ME!
67 */
68 public String escapeJDBC(String s) {
69 return s;
70 }
71
72
73 /***
74 * DOCUMENT ME!
75 *
76 * @param s DOCUMENT ME!
77 *
78 * @return DOCUMENT ME!
79 */
80 public String unescapeJDBC(String s) {
81 return s;
82 }
83 }