换个地方再试试
This commit is contained in:
@@ -128,15 +128,15 @@ if ($pr_flag) {
|
||||
strpos($s, "class=\"md") === false
|
||||
) // 没找到,那就加上
|
||||
$s = "<span class='md'>" . $s . "</span>";
|
||||
// 删除代码块里的<br />防止引起混乱
|
||||
// 删除代码块里的html字符防止引起混乱
|
||||
$s = preg_replace_callback('/(```.*?```|`[^`]*`)/s', function ($matches) {
|
||||
return str_replace('<br />', '', $matches[0]);
|
||||
$ss = str_replace('<br />', '', $matches[0]);
|
||||
// 大于小于号
|
||||
$ss = htmlspecialchars_decode($ss, ENT_QUOTES | ENT_HTML5);
|
||||
return $ss;
|
||||
}, $s);
|
||||
// 特殊转义
|
||||
$s = str_replace("<br />", "\n", $s);
|
||||
// 大于小于号
|
||||
$s = str_replace("<", "<", $s);
|
||||
$s = str_replace(">", ">", $s);
|
||||
return $s;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user