diff options
author | Andrew Dolgov <[email protected]> | 2007-05-16 07:50:00 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-05-16 07:50:00 +0100 |
commit | f826eee150ca01f14f20d8a017bac43d8b0f2a04 (patch) | |
tree | 10407f7a2b09556fe02c8cac28b53f2b3d74ad1e /functions.php | |
parent | 8fd55df16f27b12186328f9d570c818e0e19946f (diff) |
new option: STRIP_UNSAFE_TAGS
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/functions.php b/functions.php index 8ce6de89f..c8ad1c5ea 100644 --- a/functions.php +++ b/functions.php @@ -2608,10 +2608,10 @@ function sanitize_rss($str) { $res = $str; - $res = preg_replace('/<script.*?>/i', +/* $res = preg_replace('/<script.*?>/i', "<p class=\"scriptWarn\">Disabled script: ", $res); - $res = preg_replace('/<\/script.*?>/i', "</p>", $res); + $res = preg_replace('/<\/script.*?>/i', "</p>", $res); */ /* $res = preg_replace('/<embed.*?>/i', "", $res); @@ -2619,6 +2619,10 @@ "<p class=\"objectWarn\">(Disabled html object - flash or other embedded content)</p>", $res); */ + if (get_pref("STRIP_UNSAFE_TAGS")) { + $res = strip_tags($res, "<p><a><i><em><b><strong><blockquote><br><img>"); + } + return $res; } |