Browse Source
Prevent double-encoding of HTML entities in [code]
pull/40/head
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
inc/functions.php
|
@ -2196,7 +2196,7 @@ function markup(&$body, $track_cites = false, $op = false) { |
|
|
|
|
|
|
|
|
$code = rtrim(ltrim($code, "\r\n")); |
|
|
$code = rtrim(ltrim($code, "\r\n")); |
|
|
|
|
|
|
|
|
$code = "<pre class='code lang-$code_lang'>".str_replace(array("\n","\t"), array(" ","	"), htmlspecialchars($code))."</pre>"; |
|
|
$code = "<pre class='code lang-$code_lang'>".str_replace(array("\n","\t"), array(" ","	"), htmlspecialchars($code, ENT_COMPAT, "UTF-8", false))."</pre>"; |
|
|
|
|
|
|
|
|
$body = str_replace("<code $id>", $code, $body); |
|
|
$body = str_replace("<code $id>", $code, $body); |
|
|
} |
|
|
} |
|
|