2008-01-30 14:20:33 -05:00
|
|
|
mod_text2html is an Apache module. It is written in C and was designed
|
|
|
|
to replace Apache's internal text/plain handler (the core handler found
|
|
|
|
in http_core.c). It has a couple of key points.
|
2003-05-29 18:45:38 -04:00
|
|
|
|
|
|
|
1) It converts newlines to <BR>.
|
|
|
|
|
2008-01-30 14:20:33 -05:00
|
|
|
2) If it finds valid URLs it turns them in <A HREF> (and does
|
|
|
|
a good job of trying to not muddle up HTML that has been flagged as
|
|
|
|
text).
|
2003-05-29 18:45:38 -04:00
|
|
|
|
|
|
|
3) It converts '<', '>', and '&' to HTML entities.
|
|
|
|
|
|
|
|
4) Using the same method as the Unix file utility it
|
2008-01-30 14:20:33 -05:00
|
|
|
determines if the file is text in the first place. If it determines
|
|
|
|
that it is not text it sends the files, but does so as
|
|
|
|
application/octet-stream (so no nasty dumps of binary to the screen).
|