diff options
-rw-r--r-- | framework/Web/UI/WebControls/TTextHighlighter.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TTextHighlighter.php b/framework/Web/UI/WebControls/TTextHighlighter.php index cacdc85a..64791fc3 100644 --- a/framework/Web/UI/WebControls/TTextHighlighter.php +++ b/framework/Web/UI/WebControls/TTextHighlighter.php @@ -164,7 +164,15 @@ class TTextHighlighter extends TTextProcessor */
public function processText($text)
{ - if(($highlighter=Text_Highlighter::factory($this->getLanguage()))===false) + try + { + $highlighter=Text_Highlighter::factory($this->getLanguage()); + } + catch(Exception $e) + { + $highlighter=false; + } + if($highlighter===false) return ('<pre>'.htmlentities(trim($text)).'</pre>'); $options["use_language"]=true;
|