Strip hard-wrapping newlines from e-mail only if it's actually e-mail

Bug #3148 reported by Matthew Paul Thomas
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Invalid
Medium
Unassigned

Bug Description

Currently fmt:text-to-html ignores a line break if the line is between 60 and 80 characters and there is text on the next line, on the assumption that it is hard-wrapped e-mail. This occasionally causes false positives with tracebacks and the like.

But if I'm entering stuff in a Web form, there's no point doing this; Launchpad knows very well that it's not getting the text from an e-mail message. So the linebreak-ignoring code should be removed from fmt:text-to-html, and instead put in the Malone code that extracts text from an incoming e-mail message.

Credit to Daniel Holbach for this idea.

Revision history for this message
Björn Tillenius (bjornt) wrote :

It's not that simple, though. Just because an e-mail is hard wrapped, it doesn't mean that the e-mail client automatically wrapped it. Often they are manually wrapped, just like you can do in the web interface.

At the moment fmt:text-to-html displays comments sent via e-mail poorly, but they are displayed nicely in the notification e-mails that get sent out. If you would move the linebreak-ignoring code outside fmt:text-to-html as you suggested, that would result in both fmt:text-to-html and the notification e-mails would display e-mail comments poorly...

We have to come up with some other way to fix fmt:text-to-html, I've fixed the outgoing e-mail formatting once, I'm not going to like a solution that causes a regression there.

Dafydd Harries (daf)
Changed in launchpad:
status: New → Accepted
Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 3148] Strip hard-wrapping newlines from e-mail only if it's actually e-mail

On Fri, Dec 16, 2005 at 12:40:13PM -0000, Dafydd Harries wrote:
> Public bug report changed:
> https://launchpad.net/malone/bugs/3148
>
> Changed in: Launchpad (upstream)
> Status: New => Accepted

I don't think the proposed solution is acceptable. Since I'm quite sure
that there are other bugs open on text-to-hmtl breaking formatting, and
this bug is focused on a specific solution to that problem, I'm
rejecting this bug.

    affects /products/launchpad status rejected

Changed in launchpad:
status: Accepted → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.