disable scripts in rss entry content

This commit is contained in:
Andrew Dolgov 2006-08-05 13:00:01 +01:00
parent 5c365f6055
commit d48d160c64
2 changed files with 19 additions and 0 deletions

View File

@ -530,6 +530,13 @@
} }
# sanitize content
$entry_content = preg_replace('/<script.*?>/i',
"<p class=\"scriptWarn\">", $entry_content);
$entry_content = preg_replace('/<\/script>/i',
"</p>", $entry_content);
db_query($link, "BEGIN"); db_query($link, "BEGIN");
if (db_num_rows($result) == 0) { if (db_num_rows($result) == 0) {

View File

@ -1145,3 +1145,15 @@ span.debugTS {
#backReqBox { #backReqBox {
display : none; display : none;
} }
.scriptWarn:before {
content : "Disabled script:";
}
.scriptWarn {
color : white;
background-color : #903030;
border : 1px solid #601010;
padding : 3px;
font-weight : bold;
}