summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-09-21 05:15:52 +0100
committerAndrew Dolgov <[email protected]>2006-09-21 05:15:52 +0100
commit60452879145a3e208085960566113b49a22c1c33 (patch)
tree052e208bb1c653a2e6b005bb067ac8f332bf5a9a /functions.php
parent2271e805337b64948f9bc4c56d85da7388bad7af (diff)
some more sanitize_rss fixes
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/functions.php b/functions.php
index e5f06da37..bc46b7c64 100644
--- a/functions.php
+++ b/functions.php
@@ -2441,20 +2441,18 @@
}
function sanitize_rss($str) {
- $res = "";
+ $res = $str;
$res = preg_replace('/<script.*?>/i',
- "<p class=\"scriptWarn\">", $str);
+ "<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);
$res = preg_replace('/<object.*?>.*?<\/object>/i',
"<p class=\"objectWarn\">(Disabled html object
- - flash or other embedded content)</p>", $str);
-
- $res = preg_replace('/<\/object>/i',
- "</p>", $res);
+ - flash or other embedded content)</p>", $res);
return $res;
}