aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/frontend.php42
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 />",
- "&nbsp;",
- "<pre>",
- "</pre>"
- ],
- [
- "\n",
- " ",
- "",
- ""
- ],
- explode(
- "&lt;?php",
- highlight_string("<?php " . $text, true),
- 2
- )[1]
+ preg_replace(
+ '/<code [^>]+>/',
+ "",
+ str_replace(
+ [
+ "<br />",
+ "&nbsp;",
+ "<pre>",
+ "</pre>",
+ "</code>"
+ ],
+ [
+ "\n",
+ " ",
+ "",
+ "",
+ ""
+ ],
+ explode(
+ "&lt;?php",
+ highlight_string("<?php " . $text, true),
+ 2
+ )[1]
+ )
)
);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage