aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 8ee1f0da1..6794fca96 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -512,10 +512,10 @@ function bb_code($match) {
}
function bb_highlight($match) {
- if(in_array(strtolower($match[1]),['php','css','mysql','sql','abap','diff','html','perl','ruby',
+ $lang = ((in_array(strtolower($match[1]),['php','css','mysql','sql','abap','diff','html','perl','ruby',
'vbscript','avrc','dtd','java','xml','cpp','python','javascript','js','json','sh']))
- return text_highlight($match[2],strtolower($match[1]));
- return $match[0];
+ ? strtolower($match[1]) : 'php' );
+ return text_highlight($match[2],$lang);
}
function bb_fixtable_lf($match) {