fix #2 for real this time

This commit is contained in:
lolcat 2025-08-10 17:22:58 -04:00
parent 2c2bd28a9f
commit 7c970031d0
1 changed files with 24 additions and 18 deletions

View File

@ -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]
)
)
);