1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 18:14:26 +02:00

Added [code=inline] for single line <code>.

This commit is contained in:
Cameron
2013-06-01 03:55:53 -07:00
parent b00d9e4ec6
commit ae9769f8b4
2 changed files with 11 additions and 1 deletions

View File

@@ -46,10 +46,19 @@ if(isset($pref['useGeshi']) && $pref['useGeshi'] && file_exists(e_PLUGIN."geshi/
}
else
{
$code_text = html_entity_decode($code_text, ENT_QUOTES, 'utf-8');
$code_text = trim($code_text);
$code_text = htmlspecialchars($code_text, ENT_QUOTES, 'utf-8').'</pre>';
if($parm == 'inline')
{
return "<code style='unicode-bidi: embed; direction: ltr'>".$code_text."</code>";
}
// $highlighted_text = highlight_string($code_text, TRUE);
// highlighted_text = str_replace(array("<code>","</code>"),"",$highlighted_text);
$divClass = ($parm) ? $parm : 'code_highlight';