mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Updating docblock for Sanitize::stripScripts()
This commit is contained in:
parent
6c8b7fd878
commit
ccc3b9dbb4
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ class Sanitize {
|
|||
* Strips scripts and stylesheets from output
|
||||
*
|
||||
* @param string $str String to sanitize
|
||||
* @return string String with <script>, <style>, <link> elements removed.
|
||||
* @return string String with <script>, <style>, <link>, <img> elements removed.
|
||||
*/
|
||||
public static function stripScripts($str) {
|
||||
return preg_replace('/(<link[^>]+rel="[^"]*stylesheet"[^>]*>|<img[^>]*>|style="[^"]*")|<script[^>]*>.*?<\/script>|<style[^>]*>.*?<\/style>|<!--.*?-->/is', '', $str);
|
||||
|
|
Loading…
Add table
Reference in a new issue