1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-02 22:19:14 +00:00

new option: STRIP_UNSAFE_TAGS

This commit is contained in:
Andrew Dolgov
2007-05-16 07:50:00 +01:00
parent 8fd55df16f
commit f826eee150
5 changed files with 18 additions and 2 deletions

View File

@@ -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;
}