diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/frontend.php | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/lib/frontend.php b/lib/frontend.php index 4b98849..9f819ba 100644 --- a/lib/frontend.php +++ b/lib/frontend.php @@ -402,24 +402,30 @@ class frontend{ $text = trim( - str_replace( - [ - "<br />", - " ", - "<pre>", - "</pre>" - ], - [ - "\n", - " ", - "", - "" - ], - explode( - "<?php", - highlight_string("<?php " . $text, true), - 2 - )[1] + preg_replace( + '/<code [^>]+>/', + "", + str_replace( + [ + "<br />", + " ", + "<pre>", + "</pre>", + "</code>" + ], + [ + "\n", + " ", + "", + "", + "" + ], + explode( + "<?php", + highlight_string("<?php " . $text, true), + 2 + )[1] + ) ) ); |
