1 | <?php |
||
16 | class Sanitize |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @param string $string String to check |
||
21 | * |
||
22 | * @return mixed |
||
23 | */ |
||
24 | public static function removeNullCharacters($string) |
||
28 | |||
29 | /** |
||
30 | * @param string $string String to check |
||
31 | * |
||
32 | * @return mixed |
||
33 | */ |
||
34 | public static function validateStandardCharacterEntities($string) |
||
38 | |||
39 | /** |
||
40 | * @param string $string String to check |
||
41 | * |
||
42 | * @return mixed |
||
43 | */ |
||
44 | public static function validateUTF16TwoByteEncoding($string) |
||
48 | |||
49 | /** |
||
50 | * @param string $string String to check |
||
51 | * |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public static function strangeThingsAreSubmitted($string) |
||
58 | |||
59 | /** |
||
60 | * @param string $string String to check |
||
61 | * @param string $charset Character set (default ISO-8859-1) |
||
62 | * |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public static function convertCharacterEntitiesToASCII($string, $charset) |
||
84 | |||
85 | /** |
||
86 | * @param string $string String to check |
||
87 | * |
||
88 | * @return mixed |
||
89 | */ |
||
90 | public static function convertAllTabsToSpaces($string) |
||
94 | |||
95 | /** |
||
96 | * @param string $string String to check |
||
97 | * |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public static function makesPhpTagsSafe($string) |
||
108 | |||
109 | /** |
||
110 | * @param string $string String to check |
||
111 | * |
||
112 | * @return mixed |
||
113 | */ |
||
114 | public static function compactAnyExplodedWords($string) |
||
130 | |||
131 | /** |
||
132 | * @param string $string String to check |
||
133 | * |
||
134 | * @return mixed |
||
135 | */ |
||
136 | public static function removeDisallowedJavaScriptInLinksOrImgTags($string) |
||
151 | |||
152 | /** |
||
153 | * @param string $string String to check |
||
154 | * |
||
155 | * @return mixed |
||
156 | */ |
||
157 | public static function removeJavaScriptEventHandlers($string) |
||
166 | |||
167 | /** |
||
168 | * @param string $string String to check |
||
169 | * |
||
170 | * @return mixed |
||
171 | */ |
||
172 | public static function healNaughtyHTMLElements($string) |
||
182 | |||
183 | /** |
||
184 | * @param string $string String to check |
||
185 | * |
||
186 | * @return mixed |
||
187 | */ |
||
188 | public static function healNaughtyScriptingElements($string) |
||
197 | |||
198 | /** |
||
199 | * @param string $string String to check |
||
200 | * |
||
201 | * @return mixed |
||
202 | */ |
||
203 | public static function removeJavaScriptHardRedirects($string) |
||
220 | } |
||
221 |