Archived emails to mailing lists are displayed without line-wrapping

Create issue
Issue #723 resolved
Ian Hinder created an issue

See

http://cactuscode.org/pipermail/developers/2011-November/006258.html

This displays without any line wrapping. This only happens with some emails (mine?). I'm not doing anything non-standard, as far as I know.

Keyword:

Comments (11)

  1. Erik Schnetter
    • removed comment

    Your email does not contain any line break in its paragraphs.

    I think that our mailing list software is not very clever in presenting emails; it just shows the line breaks that the original email has.

  2. Frank Löffler
    • removed comment

    Replying to [comment:1 eschnett]:

    I think that our mailing list software is not very clever in presenting emails; it just shows the line breaks that the original email has.

    That is what I would expect it to do. Suppose you don't want to have line breaks, e.g. because you pasted some code which wouldn't work with line breaks.

    If you want line breaks, you should have the email client insert them.

  3. Ian Hinder reporter
    • removed comment

    I don't want the archive to insert line breaks, I want it to wrap the text to the width of the window. If I send an email to a mailing list with the default settings of a standard mail client (Apple Mail), then I expect that mail to be formatted in the same way in the archive as when it is displayed in standard mail clients. Standard mail clients will wrap the text to the width of the window, and that is what I would expect from the HTML in the message archive.

    (Note: this is a separate issue to the ancient problem of not being allowed more than 76 characters per line in raw SMTP - that is handled by the quoted-printable encoding method in MIME, and the email should simply be considered to have no line breaks in its paragraphs.)

  4. Roland Haas
    • removed comment

    The archive pages use <PRE> tags for the actual email. Some CSS can be used to wrap the line.

    http://labnol.blogspot.com/2006/10/html-css-trick-for-displaying-code.html

    I tried this with (a local copy of) Ian's email adding

    <style type="text/css">
    pre {
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap !important; /* 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+ */
    }
    </style>
    

    to it's <head> section and it works fine with Firefox 3.6.24 on Linux.

    I have no idea how to include css styles in mailman/pipermails web pages though.

  5. Roland Haas

    While this is really strictly an issue with the sender’s mail client, this problem is not going away. A partial workaround is to add some css to the <pre> element that Mailman (well pipermail I guess) is using in the its html pages. Something like:

    overflow-x: auto;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    width: 78ch;
    

    word-wraps at the 78 character since it sizes the element to be as wide as 78 “0” characters and asks for word wrap.

    Possibly this could be added to the html template used: https://wiki.list.org/DOC/4.48 How can I change the HTML or .txt templates used by my mailing lists%3F

  6. Log in to comment