summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/include/rcube_shared.inc7
1 files changed, 2 insertions, 5 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index 7f3771b08..a5e5e8598 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -212,12 +212,9 @@ class rcube_html_page
// find and add page footer
$output_lc = strtolower($output);
- if(($fpos = strrpos($output_lc, '</body>')) ||
- ($fpos = strrpos($output_lc, '</html>')))
- {
- $fpos -= 8;
+ if(($fpos = strrstr($output_lc, '</body>')) ||
+ ($fpos = strrstr($output_lc, '</html>')))
$output = substr($output,0,$fpos) . "$__page_footer\n" . substr($output,$fpos);
- }
else
$output .= "\n$__page_footer";