From 674a0fb41dc80c7d1a99339481339ac6e5f75004 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 09 Nov 2006 14:06:37 -0500
Subject: [PATCH] Corrected template parsing and output encoding

---
 program/include/rcube_shared.inc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index 11af482..7f3771b 100644
--- a/program/include/rcube_shared.inc
+++ b/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";

--
Gitblit v1.9.1