I browse the archives of many mailing lists created by Mailman.
I love its ASCII preformatted display, but many messages to mailing lists are not word-wrapped and so each paragraph appears as a few unreadably long lines. For example, http://lists.freedesktop.org/archives/xorg/2008-August/038178.html, and resize your browser window wider and narrower.
Modern browsers support the CSS "white-space" property to display long lines wrapped to fit the window, see http://archivist.incutio.com/viewlist/css-discuss/55677
I modified the <pre> tag in that Mailman message to use this CSS style and it now displays fine (in Firefox 3.1a2 and MSIE7 on Windows XP), see http://www.skierpage.com/moz_bugs/pre_wrap_test.html , resize your browser window wider and narrower, and view its source.
This *does not* affect copy and paste of long lines and does not involve processing or changing the text within the pre tag in any way. It just makes many more messages readable!
The new pre tag is
white-space: pre-wrap; /* css-3 should we be so lucky... */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 ?? */
white-space: -o-pre-wrap; /* Opera 7 ?? */
word-wrap: break-word; /* Internet Explorer 5.5+ */
_white-space: pre; /* IE only hack to re-specify in addition to word-wrap */
Please consider making the change in a future Mailman release. In appreciation of your consideration I donated $10 to GNU Mailman.
P.S. In order to pass strict validation, adding a style means you have to specify the HTML 4.01 Transitional DOCTYPE. I did in my modified file and passes 100%. According to validator.w3.org, the original DOCTYPE in Mailman's HTML output ( <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> ) is invalid anyway.
Log in to post a comment.