适应版本:Discuz!6.0.0(0904版本)
修正问题:查看帖子的时候出现诸如
-
- php?name=%B5%C8%C0%EB%D7%D3" onclick="tagshow(event)" class="t_tag">
复制代码 的多余内容
修正方法:
1.打开viewthread.php
查找- $postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
复制代码 改为- $postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
- $postlist[$firstpid]['message'] = preg_replace('#(.*)#siUe', "'\\1'", $postlist[$firstpid]['message']);
复制代码 2.打开include/discuzcode.func.php
查找- $message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
复制代码 改为- $message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
- $message = preg_replace('#(.*)#siU', "\\1", $message);
复制代码 查找- global $_DCACHE;
- if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
- $text = str_replace($replaceword, ''.$replaceword.'', $text);
- unset($_DCACHE['tags'][$key]);
- }
- } else {
- $text = str_replace($replaceword, ''.$replaceword.'', $text);
- }
复制代码 改为- global $_DCACHE;
- if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
- $text = str_replace($replaceword, ''.$replaceword.'', $text);
- unset($_DCACHE['tags'][$key]);
- }
- } else {
- $text = str_replace($replaceword, ''.$replaceword.'', $text);
- }
复制代码 |