allow message display to wrap (simple HTML provided)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
Medium
|
Mark Sapiro |
Bug Description
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://
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://
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://
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
<pre style="
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.
[http://
Related branches
Changed in mailman: | |
status: | Fix Committed → Fix Released |
Originator: NO
Thank you for the suggested style. It looks promising.
It is not clear to me whether you operate a Mailman site or are just a wiki.list. org/x/jYA9> with the following changes:
member of lists, but a site can easily accomplish what you've done by
making site/language versions of the article.html template per
<http://
Change the doctype declaration to
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
and add the following style in the <head> section
<style type="text/css">
pre
{
white-space: pre-wrap; /* css-3 */
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 */
}
</style>
Of course the browser specific parts of the style don't pass validation at jigsaw. w3.org/ css-validator/> but that's not unexpected. Note
<http://
however that the valid style
<style type="text/css">
pre
{
white-space: pre-wrap; /* css-3 */
}
</style>
alone appears sufficient in Firefox 3.0.1, Opera 9.51 and Safari 3.1.2,
but not in Camino 1.6.3 or MSIE 7.0 and adding
white-space: -moz-pre-wrap;
works in Camino.