Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php |
— | — | @@ -28,15 +28,16 @@ |
29 | 29 | $text = preg_replace( '/^\n+/', '', $text ); |
30 | 30 | // Validate language |
31 | 31 | if( isset( $args['lang'] ) ) { |
32 | | - $lang = strtolower( $args['lang'] ); |
| 32 | + $lang = $args['lang']; |
33 | 33 | } else { |
34 | 34 | // language is not specified. Check if default exists, if yes, use it. |
35 | | - if ( !is_null($wgSyntaxHighlightDefaultLang) ) { |
36 | | - $lang = strtolower($wgSyntaxHighlightDefaultLang); |
37 | | - } else { |
38 | | - return self::formatError( htmlspecialchars( wfMsgForContent( 'syntaxhighlight-err-language' ) ) ); |
39 | | - } |
| 35 | + if ( !is_null( $wgSyntaxHighlightDefaultLang ) ) { |
| 36 | + $lang = $wgSyntaxHighlightDefaultLang; |
| 37 | + } else { |
| 38 | + return self::formatError( htmlspecialchars( wfMsgForContent( 'syntaxhighlight-err-language' ) ) ); |
| 39 | + } |
40 | 40 | } |
| 41 | + $lang = strtolower( $lang ); |
41 | 42 | if( !preg_match( '/^[a-z_0-9-]*$/', $lang ) ) |
42 | 43 | return self::formatError( htmlspecialchars( wfMsgForContent( 'syntaxhighlight-err-language' ) ) ); |
43 | 44 | $geshi = self::prepare( $text, $lang ); |