diff --git a/include/utils/utils.php b/include/utils/utils.php index b30dd3a3ab5e5f5c1718cb55fbfbdb042c1bfe80..038ab39587fad15dd657575f5be0b8c9ca197104 100755 --- a/include/utils/utils.php +++ b/include/utils/utils.php @@ -345,6 +345,12 @@ $toHtml = array( */ function to_html($string, $encode=true) { + global $htmlcache; + if($htmlcache[$string]){ + return($htmlcache[$string]); + } + $startstring=$string; + global $log,$default_charset; //$log->debug("Entering to_html(".$string.",".$encode.") method ..."); global $toHtml; @@ -385,6 +391,7 @@ function to_html($string, $encode=true) } //$log->debug("Exiting to_html method ..."); + $htmlcache[$startstring]=$string; return $string; }