| @@ 891-902 (lines=12) @@ | ||
| 888 | * @param array $match |
|
| 889 | * @return string |
|
| 890 | */ |
|
| 891 | protected function _js_link_removal($match) |
|
| 892 | { |
|
| 893 | return str_replace( |
|
| 894 | $match[1], |
|
| 895 | preg_replace( |
|
| 896 | '#href=.*?(?:(?:alert|prompt|confirm)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|<script|<xss|data\s*:)#si', |
|
| 897 | '', |
|
| 898 | $this->_filter_attributes($match[1]) |
|
| 899 | ), |
|
| 900 | $match[0] |
|
| 901 | ); |
|
| 902 | } |
|
| 903 | ||
| 904 | // -------------------------------------------------------------------- |
|
| 905 | ||
| @@ 919-930 (lines=12) @@ | ||
| 916 | * @param array $match |
|
| 917 | * @return string |
|
| 918 | */ |
|
| 919 | protected function _js_img_removal($match) |
|
| 920 | { |
|
| 921 | return str_replace( |
|
| 922 | $match[1], |
|
| 923 | preg_replace( |
|
| 924 | '#src=.*?(?:(?:alert|prompt|confirm|eval)(?:\(|&\#40;)|javascript:|livescript:|mocha:|charset=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)#si', |
|
| 925 | '', |
|
| 926 | $this->_filter_attributes($match[1]) |
|
| 927 | ), |
|
| 928 | $match[0] |
|
| 929 | ); |
|
| 930 | } |
|
| 931 | ||
| 932 | // -------------------------------------------------------------------- |
|
| 933 | ||