From: Jan Schneider Date: Mon, 20 Apr 2009 21:32:20 +0000 (+0200) Subject: Properly strip out HTML headers and footers from enscript. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=da5b7de80ca05c72dc3ca8c9439f6602e587e378;p=horde.git Properly strip out HTML headers and footers from enscript. --- diff --git a/framework/Mime/lib/Horde/Mime/Viewer/Enscript.php b/framework/Mime/lib/Horde/Mime/Viewer/Enscript.php index e8df9e2fc..3437a9f59 100644 --- a/framework/Mime/lib/Horde/Mime/Viewer/Enscript.php +++ b/framework/Mime/lib/Horde/Mime/Viewer/Enscript.php @@ -86,11 +86,9 @@ class Horde_Mime_Viewer_Enscript extends Horde_Mime_Viewer_Source $results = shell_exec($this->_conf['location'] . " -E$lang --language=html --color --output=- < $tmpin"); /* Strip out the extraneous HTML from enscript. */ - if ($inline) { - $res_arr = preg_split('/\<\/?pre\>/i', $results); - if (count($res_arr) == 3) { - $results = trim($res_arr[1]); - } + $res_arr = preg_split('/\<\/?pre\>/i', $results); + if (count($res_arr) == 3) { + $results = trim($res_arr[1]); } return $this->_lineNumber($results);