This commit is contained in:
杜恒 2021-03-06 18:04:47 +08:00
parent da5444e1f3
commit 4cadbec9e3
3 changed files with 20 additions and 14 deletions

View File

@ -335,7 +335,7 @@ document.addEventListener('DOMContentLoaded', () => {
isSubmit = false; isSubmit = false;
$('.joe_comment__respond-form .foot .submit button').html('发表评论'); $('.joe_comment__respond-form .foot .submit button').html('发表评论');
} else { } else {
// window.location.href = changeURLArg(location.href, 'scroll', 'joe_comment'); window.location.href = changeURLArg(location.href, 'scroll', 'joe_comment');
} }
} }
}); });

File diff suppressed because one or more lines are too long

View File

@ -6,9 +6,9 @@ require_once('short.php');
/* 过滤评论回复 */ /* 过滤评论回复 */
function _parseCommentReply($text) function _parseCommentReply($text)
{ {
if (strip_tags($text)) {
$text = _parseReply($text); $text = _parseReply($text);
$text = preg_replace('/\{!{(.*?)\}!}/', '<img class="lazyload draw_image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="$1" onerror="javascript: this.src=\'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\';" alt="画图"/>', $text); $text = preg_replace('/\{!{(.*?)\}!}/', '<img class="lazyload draw_image" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="$1" onerror="javascript: this.src=\'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\';" alt="画图"/>', $text);
if (strip_tags($text)) {
echo $text; echo $text;
} else { } else {
echo "该回复疑似异常,已被系统拦截!"; echo "该回复疑似异常,已被系统拦截!";
@ -38,21 +38,27 @@ function _parseReply($text)
/* 格式化留言回复 */ /* 格式化留言回复 */
function _parseLeavingReply($text) function _parseLeavingReply($text)
{ {
if (strip_tags($text)) {
$text = strip_tags($text);
$text = _parseReply($text); $text = _parseReply($text);
$text = preg_replace('/\{!\{(.*?)\}!\}/', '<img class="draw_image" src="$1" alt="画图"/>', $text); $text = preg_replace('/\{!\{(.*?)\}!\}/', '<img class="draw_image" src="$1" alt="画图"/>', $text);
$text = strip_tags($text);
if (!$text) $text = "该回复疑似异常,已被系统拦截!";
echo $text; echo $text;
} else {
echo "该回复疑似异常,已被系统拦截!";
}
} }
/* 格式化侧边栏回复 */ /* 格式化侧边栏回复 */
function _parseAsideReply($text, $type = true) function _parseAsideReply($text, $type = true)
{ {
$text = preg_replace('~{!{.*~', '# 图片回复', $text); if (strip_tags($text)) {
$text = strip_tags($text); $text = strip_tags($text);
if (!$text) $text = "该回复疑似异常,已被系统拦截!"; $text = preg_replace('~{!{.*~', '# 图片回复', $text);
if ($type) echo _parseReply($text); if ($type) echo _parseReply($text);
else echo $text; else echo $text;
} else {
echo "该回复疑似异常,已被系统拦截!";
}
} }
/* 过滤侧边栏最新回复的跳转链接 */ /* 过滤侧边栏最新回复的跳转链接 */