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