File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed
parsedown-extended-1.1.2-modified Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,18 @@ http {
21
21
root /var/www/html;
22
22
index index.php index.html index.htm;
23
23
24
+ location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg)$ {
25
+ try_files $uri =404;
26
+ add_header Cache-Control "public, max-age=3600";
27
+ }
28
+ location ~* \.md$ {
29
+ return 301 /;
30
+ }
24
31
location / {
25
- try_files $uri $uri/ /index.php?$args;
32
+ if (!-e $request_filename){
33
+ rewrite ^/(.*)$ /index.php?doc=$1 last;
34
+ }
35
+ try_files $uri $uri/ =404;
26
36
}
27
37
28
38
location ~ \.php$ {
38
48
}
39
49
}
40
50
}
41
-
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ class ParsedownExtended extends DynamicParent
24
24
public const ID_ATTRIBUTE_DEFAULT = 'toc ' ;
25
25
protected $ tagToc = '[toc] ' ;
26
26
27
+ protected $ options ;
28
+
27
29
protected $ contentsListArray = [];
28
30
protected $ contentsListString = '' ;
29
31
protected $ firstHeadLevel = 0 ;
Original file line number Diff line number Diff line change @@ -625,8 +625,8 @@ protected function processTag($elementMarkup) # recursive
625
625
$ DOMDocument = new DOMDocument ;
626
626
627
627
# http://stackoverflow.com/q/11309194/200145
628
- $ elementMarkup = mb_convert_encoding ($ elementMarkup , ' HTML-ENTITIES ' , 'UTF-8 ' );
629
-
628
+ $ elementMarkup = html_entity_decode ($ elementMarkup , ENT_COMPAT | ENT_HTML5 , 'UTF-8 ' );
629
+
630
630
# http://stackoverflow.com/q/4879946/200145
631
631
$ DOMDocument ->loadHTML ($ elementMarkup );
632
632
$ DOMDocument ->removeChild ($ DOMDocument ->doctype );
You can’t perform that action at this time.
0 commit comments