content;
$content = _parseReply($content);
if (strpos($content, '{x}') !== false || strpos($content, '{ }') !== false) {
$content = strtr($content, array(
"{x}" => '',
"{ }" => ''
));
}
if (strpos($content, '{music') !== false) {
$content = preg_replace('/{music-list([^}]*)\/}/SU', '', $content);
$content = preg_replace('/{music([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{bilibili') !== false) {
$content = preg_replace('/{bilibili([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{dplayer') !== false) {
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : Helper::options()->themeUrl . '/library/player.php?url=';
$content = preg_replace('/{dplayer([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{mtitle') !== false) {
$content = preg_replace('/{mtitle([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{abtn') !== false) {
$content = preg_replace('/{abtn([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{anote') !== false) {
$content = preg_replace('/{anote([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{dotted') !== false) {
$content = preg_replace('/{dotted([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{message') !== false) {
$content = preg_replace('/{message([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{progress') !== false) {
$content = preg_replace('/{progress([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{hide') !== false) {
$db = Typecho_Db::get();
$hasComment = $db->fetchAll($db->select()->from('table.comments')->where('cid = ?', $post->cid)->where('mail = ?', $post->remember('mail', true))->limit(1));
if ($hasComment || $login) {
$content = strtr($content, array("{hide}" => "", "{/hide}" => ""));
} else {
$content = preg_replace('/{hide[^}]*}([\s\S]*?){\/hide}/', '', $content);
}
}
if (strpos($content, '{card-default') !== false) {
$content = preg_replace('/{card-default([^}]*)}([\s\S]*?){\/card-default}/', '', $content);
}
/* 过滤复制粘贴功能 */
if (strpos($content, '{copy') !== false) {
$content = preg_replace('/{copy(.*)}/SU', '', $content);
$content = preg_replace('/{\/copy}/SU', '', $content);
}
echo $content;
}