rn","
引用:",$bbcode);
$bbcode=str_replace("[quote]","引用:",$bbcode);
$bbcode=str_replace("rn","
",$bbcode);
$bbcode=str_replace("[/quote]","
",$bbcode);
”,在后面加入“
// Hack color,font,size,style,center
$bbcode=eregi_replace("\
{0,1}(#[a-z0-9-]{6})["]{0,1}\]","",$bbcode); // [color=]
$bbcode=eregi_replace("\[/color\]","",$bbcode); // ;
$bbcode=eregi_replace("\
{0,1}([0-9]{1})["]{0,1}\]","",$bbcode); // [size=]
$bbcode=eregi_replace("\[/size\]","",$bbcode); //
$bbcode=eregi_replace("\[font=["]{0,1}([^\[]*)["]{0,1}\]","
",$bbcode); // [font=]
$bbcode=eregi_replace("\[/font\]","",$bbcode); // // [/font]
$bbcode=eregi_replace("\[style=["]{0,1}([^\[]*)["]{0,1}\]","
",$bbcode); // [style=]
$bbcode=eregi_replace("\[/style\]","",$bbcode); // [/style]
$bbcode=eregi_replace("\[center\]","
",$bbcode); // [center=]
$bbcode=eregi_replace("\[/center\]","
",$bbcode); // [/center]
// End Hack color size style
”,完成。
范例可以参考:
《禁止javaScript》
原因:vBulletin没有对Javascript脚本做任何的特别对待处理,所以如果论坛开放了HTML代码的话,就有可能受到alert或window.open的袭击而沦陷。
步骤:打开 global.php ,查找“
if ($dohtml==0) {
// 删除HTML代码
$bbcode=str_replace("&","&",$bbcode);
$bbcode=str_replace("
$bbcode=str_replace(">",">",$bbcode);
}
”,在最后一个花括号前,加入“
} else {
$bbcode=eregi_replace("","",$bbcode);
”,完成!
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】