From 02af96794734b2ed8431eeefe5a4fc8e56c67224 Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Wed, 15 Apr 2020 18:01:08 +0800 Subject: =?UTF-8?q?:bird:=20Perf:=20=E5=B9=B3=E6=BB=91=E7=9A=84=E9=94=9A?= =?UTF-8?q?=E7=82=B9=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Contents.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/Contents.php') diff --git a/libs/Contents.php b/libs/Contents.php index 75aa833..256ff46 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -229,7 +229,10 @@ class Contents static public function parseHeaderCallback($matchs) { // 增加单独标记,否则冲突 - $id = 'toc_'.(self::$CurrentTocID++); + $id = $matchs[3]; + $id = str_replace(' ','\%20',$id); + $id = str_replace('&','\%26',$id); + $id = str_replace('?','\%3F;',$id); return ''.$matchs[3].''; } -- cgit v1.2.3