| @@ 61-68 (lines=8) @@ | ||
| 58 |                 return str_replace('%2F', '/', rawurlencode((string)$value)); | 
                                |
| 59 | case 'quotes':  | 
                                |
| 60 |                 return preg_replace("#(?<!\\\\)'#", "\\'", (string)$value); | 
                                |
| 61 | case 'hex':  | 
                                |
| 62 | $out = '';  | 
                                |
| 63 | $cnt = strlen((string)$value);  | 
                                |
| 64 |                 for ($i = 0; $i < $cnt; ++ $i) { | 
                                |
| 65 | $out .= '%' . bin2hex((string)$value[$i]);  | 
                                |
| 66 | }  | 
                                |
| 67 | ||
| 68 | return $out;  | 
                                |
| 69 | case 'hexentity':  | 
                                |
| 70 | $out = '';  | 
                                |
| 71 | $cnt = strlen((string)$value);  | 
                                |
| @@ 69-76 (lines=8) @@ | ||
| 66 | }  | 
                                |
| 67 | ||
| 68 | return $out;  | 
                                |
| 69 | case 'hexentity':  | 
                                |
| 70 | $out = '';  | 
                                |
| 71 | $cnt = strlen((string)$value);  | 
                                |
| 72 |                 for ($i = 0; $i < $cnt; ++ $i) { | 
                                |
| 73 | $out .= '&#x' . bin2hex((string)$value[$i]) . ';';  | 
                                |
| 74 | }  | 
                                |
| 75 | ||
| 76 | return $out;  | 
                                |
| 77 | case 'javascript':  | 
                                |
| 78 | case 'js':  | 
                                |
| 79 | return strtr((string)$value,  | 
                                |