aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2025-08-10 17:22:58 -0400
committerlolcat <will@lolcat.ca>2025-08-10 17:22:58 -0400
commit7c970031d06d8ec1addcb530dc71e2dc7da95178 (patch)
tree75807cd674d8aaa2ef41905692cd0c5c82c75e3e /lib
parent2c2bd28a9ffbe6e55c9e6c1554f9c00f6bb31c3e (diff)
fix #2 for real this time
Diffstat (limited to 'lib')
-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