@@ 189-197 (lines=9) @@ | ||
186 | * @param $text |
|
187 | * @return mixed|string |
|
188 | */ |
|
189 | function wani_html_special_chars($text) |
|
190 | { |
|
191 | $text = wani_strip_control_code($text); |
|
192 | $text = wani_conv_js($text); |
|
193 | $text = htmlspecialchars($text, ENT_QUOTES); |
|
194 | $text = preg_replace("/'/", ''', $text); |
|
195 | //$text = preg_replace("/&/i", '&', $text); |
|
196 | return $text; |
|
197 | } |
|
198 | ||
199 | //--------------------------------------------------------- |
|
200 | // convert html_special_chars for url |
|
@@ 213-222 (lines=10) @@ | ||
210 | * @param $text |
|
211 | * @return mixed|string |
|
212 | */ |
|
213 | function wani_html_special_chars_url($text) |
|
214 | { |
|
215 | $text = wani_strip_control_code($text); |
|
216 | $text = wani_strip_crlf($text); |
|
217 | $text = wani_conv_js($text); |
|
218 | $text = preg_replace('/&/i', '&', $text); |
|
219 | $text = htmlspecialchars($text, ENT_QUOTES); |
|
220 | ||
221 | return $text; |
|
222 | } |
|
223 | ||
224 | // BUG 3169: need to sanitaize $_SERVER['PHP_SELF'] |
|
225 | /** |