thomascube
2006-11-09 674a0fb41dc80c7d1a99339481339ac6e5f75004
Corrected template parsing and output encoding

2 files modified
8 ■■■■■ changed files
program/include/main.inc 5 ●●●●● patch | view | raw | blame | history
program/include/rcube_shared.inc 3 ●●●● patch | view | raw | blame | history
program/include/main.inc
@@ -958,8 +958,9 @@
      }
    else if ($mode=='remove')
      $str = strip_tags($str);
    $out = strtr($str, $encode_arr);
    // avoid douple quotation of &
    $out = preg_replace('/&([a-z]{2,5});/', '&\\1;', strtr($str, $encode_arr));
      
    return $newlines ? nl2br($out) : $out;
    }
program/include/rcube_shared.inc
@@ -215,7 +215,8 @@
    if(($fpos = strrpos($output_lc, '</body>')) ||
       ($fpos = strrpos($output_lc, '</html>')))
      {
      $output = substr($output,0,$fpos) . "$__page_footer\n" . substr($output,$fpos,strlen($output));
      $fpos -= 8;
      $output = substr($output,0,$fpos) . "$__page_footer\n" . substr($output,$fpos);
      }
    else
      $output .= "\n$__page_footer";