Prevent double-encoding of HTML entities in [code]
This commit is contained in:
parent
e872b9ceaa
commit
217e873e88
|
@ -2196,8 +2196,8 @@ function markup(&$body, $track_cites = false, $op = false) {
|
|||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue