Corrected template parsing and output encoding

release-0.6
thomascube 18 years ago
parent 03ac2132e2
commit 674a0fb41d

@ -958,8 +958,9 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
}
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;
}

@ -215,7 +215,8 @@ class rcube_html_page
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";

Loading…
Cancel
Save