| @@ 467-478 (lines=12) @@ | ||
| 464 | * @param array |
|
| 465 | * @return string |
|
| 466 | */ |
|
| 467 | protected function _js_link_removal($match) |
|
| 468 | { |
|
| 469 | return str_replace( |
|
| 470 | $match[1], |
|
| 471 | preg_replace( |
|
| 472 | '#href=.*?(alert\(|alert&\#40;|javascript\:|livescript\:|mocha\:|charset\=|window\.|document\.|\.cookie|<script|<xss|data\s*:)#si', |
|
| 473 | '', |
|
| 474 | $this->_filter_attributes(str_replace(['<', '>'], '', $match[1])) |
|
| 475 | ), |
|
| 476 | $match[0] |
|
| 477 | ); |
|
| 478 | } |
|
| 479 | ||
| 480 | // -------------------------------------------------------------------- |
|
| 481 | ||
| @@ 493-504 (lines=12) @@ | ||
| 490 | * @param array |
|
| 491 | * @return string |
|
| 492 | */ |
|
| 493 | protected function _js_img_removal($match) |
|
| 494 | { |
|
| 495 | return str_replace( |
|
| 496 | $match[1], |
|
| 497 | preg_replace( |
|
| 498 | '#src=.*?(alert\(|alert&\#40;|javascript\:|livescript\:|mocha\:|charset\=|window\.|document\.|\.cookie|<script|<xss|base64\s*,)#si', |
|
| 499 | '', |
|
| 500 | $this->_filter_attributes(str_replace(['<', '>'], '', $match[1])) |
|
| 501 | ), |
|
| 502 | $match[0] |
|
| 503 | ); |
|
| 504 | } |
|
| 505 | ||
| 506 | // -------------------------------------------------------------------- |
|
| 507 | ||