diff --git a/e107_core/bbcodes/code.bb b/e107_core/bbcodes/code.bb index 27a66b8ca..1a92e160a 100644 --- a/e107_core/bbcodes/code.bb +++ b/e107_core/bbcodes/code.bb @@ -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').''; + + if($parm == 'inline') + { + return "".$code_text.""; + } + // $highlighted_text = highlight_string($code_text, TRUE); // highlighted_text = str_replace(array("",""),"",$highlighted_text); $divClass = ($parm) ? $parm : 'code_highlight'; diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php index f235ab5db..15e1ec960 100644 --- a/e107_core/shortcodes/batch/bbcode_shortcodes.php +++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php @@ -39,7 +39,8 @@ class bbcode_shortcodes extends e_shortcode 6 => array('[h=5][/h]','Heading 6'), 7 => array('[block][/block]','Block'), 8 => array('[blockquote][/blockquote]', 'Quote'), - 9 => array('[code][/code]', 'Code') + 9 => array('[code][/code]', 'Code Block'), + 10 => array('[code=inline][/code]', 'Code Inline') );