disable scripts in rss entry content

master
Andrew Dolgov 19 years ago
parent 5c365f6055
commit d48d160c64

@ -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) {

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

Loading…
Cancel
Save