Corrected template parsing and output encoding
| | |
| | | } |
| | | 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; |
| | | } |
| | |
| | | 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"; |