summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-26 23:52:47 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-26 23:52:47 +0200
commit1a24a9da3cfbacf8802ffd0b79f5494d30278007 (patch)
tree4162c6176a54085aa9d9f63417707975e611937d /system/core
parentffe7938b8d6dfdbdac8a34008dbbb15d31de6080 (diff)
Fix issue #427
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Security.php13
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