[imp] [patch] enscript mime viewer
Daniel Eckl
daniel.eckl at gmx.de
Thu Dec 18 05:31:00 PST 2003
Hi list!
Here is a patch for the enscript mime viewer.
I deleted the style "white-space:pre", because this causes an additional line
break at least in opera.
Deleting this has no drawback in IE6. I couldn't do more testing, sorry...
I couldn't test MozillaFirebird, because my Firebird 0.7 crashes when browsing
to /horde on my installation... No idea why... Perhaps someone could test this,
too? If another firebird works, then it's a config problem on my firebird. :)
Another problem with the enscript viewer is the line numbers if long lines are
wrapped by the browser. Since the line numbers are in another table data and
only seperated by <br />, they don't compensate the fact, that one line is
broken in two or more. But I have got no solution for that at the moment...
Third, a small question: I don't exactly know where to post messages regarding
the horde framework. Enscript Viewer is used by IMP. But the Viewer resides in
the framework, which is belonging to horde base I think. Does it matter if I
post it to horde or to imp list? Do you have a preference to this subject?
Greets,
Daniel
-------------- next part --------------
*** MIME/MIME/Viewer/enscript.php.orig Thu Dec 18 14:07:07 2003
--- MIME/MIME/Viewer/enscript.php Thu Dec 18 14:20:41 2003
*************** class MIME_Viewer_enscript extends MIME_
*** 57,63 ****
/* Strip out the extraneous HTML from Enscript, and output it. */
$res_arr = preg_split('/\<\/?pre\>/i', $results);
if (sizeof($res_arr) == 3) {
! $results = '<span style="white-space:pre;font-family:monospace">' .
nl2br(trim($res_arr[1])) . '</span>';
}
return $this->lineNumber($results);
--- 57,63 ----
/* Strip out the extraneous HTML from Enscript, and output it. */
$res_arr = preg_split('/\<\/?pre\>/i', $results);
if (sizeof($res_arr) == 3) {
! $results = '<span style="font-family:monospace">' . nl2br(trim($res_arr[1])) .
'</span>';
}
return $this->lineNumber($results);
More information about the imp
mailing list