diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-28 13:08:40 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-28 13:08:40 +0200 |
commit | 89db8ee4c16c5cdd589e51f27fcd3fc23cf41aae (patch) | |
tree | 0a667b4e332fe5181bba4531d025740bc892821a /system/core | |
parent | cbd78d826b965ad6dfc953686594749cbdf21af3 (diff) | |
parent | d580999cead0aa37d705c2f32e02712a2d522deb (diff) |
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into feature/db_subdrivers
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Security.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/system/core/Security.php b/system/core/Security.php index 4593a1090..227217e75 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -561,6 +561,19 @@ class CI_Security { // ---------------------------------------------------------------- /** + * Strip Image Tags + * + * @param string + * @return string + */ + public function strip_image_tags($str) + { + return preg_replace(array('#<img\s+.*?src\s*=\s*["\'](.+?)["\'].*?\>#', '#<img\s+.*?src\s*=\s*(.+?).*?\>#'), '\\1', $str); + } + + // ---------------------------------------------------------------- + + /** * Compact Exploded Words * * Callback function for xss_clean() to remove whitespace from |