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;
$('.joe_comment__respond-form .foot .submit button').html('发表评论');
} 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)
{
$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);
if (strip_tags($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);
echo $text;
} else {
echo "该回复疑似异常,已被系统拦截!";
@ -38,21 +38,27 @@ function _parseReply($text)
/* 格式化留言回复 */
function _parseLeavingReply($text)
{
$text = _parseReply($text);
$text = preg_replace('/\{!\{(.*?)\}!\}/', '<img class="draw_image" src="$1" alt="画图"/>', $text);
$text = strip_tags($text);
if (!$text) $text = "该回复疑似异常,已被系统拦截!";
echo $text;
if (strip_tags($text)) {
$text = strip_tags($text);
$text = _parseReply($text);
$text = preg_replace('/\{!\{(.*?)\}!\}/', '<img class="draw_image" src="$1" alt="画图"/>', $text);
echo $text;
} else {
echo "该回复疑似异常,已被系统拦截!";
}
}
/* 格式化侧边栏回复 */
function _parseAsideReply($text, $type = true)
{
$text = preg_replace('~{!{.*~', '# 图片回复', $text);
$text = strip_tags($text);
if (!$text) $text = "该回复疑似异常,已被系统拦截!";
if ($type) echo _parseReply($text);
else echo $text;
if (strip_tags($text)) {
$text = strip_tags($text);
$text = preg_replace('~{!{.*~', '# 图片回复', $text);
if ($type) echo _parseReply($text);
else echo $text;
} else {
echo "该回复疑似异常,已被系统拦截!";
}
}
/* 过滤侧边栏最新回复的跳转链接 */