diff options
author | xue <> | 2007-07-25 11:19:54 +0000 |
---|---|---|
committer | xue <> | 2007-07-25 11:19:54 +0000 |
commit | 6e3ad1ec3cdeaef821ae6ff96762bec038ded36e (patch) | |
tree | 4200e4938e04191c004e82b341f680e1858baaf0 /framework/Web/UI/WebControls/TTextHighlighter.php | |
parent | c4062970b2868016d4746598dc2eeafdef2e09c5 (diff) |
Fixed a TTextHighlighter bug.
Diffstat (limited to 'framework/Web/UI/WebControls/TTextHighlighter.php')
-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;
|