Closed Bug 431704 Opened 17 years ago Closed 16 years ago

Remove useless newlines in replies sent by email_in.pl

Categories

(Bugzilla :: Incoming Email, defect)

3.0.3
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

Attachments

(1 file, 1 obsolete file)

When you pass illegal changes to email_in.pl, it replies to the sender about what's wrong: You tried to change the Priority field from P4 to P1 , but only the assignee or reporter of the bug, or a sufficiently empowered user may change that field. Frédéric Buclin wrote: > > @priority = P1 As you can see, the message is pretty ugly, because every newline from user-error.html.tmpl is displayed as is in the reply. These newlines are not a problem from the web browser because HTML doesn't render them. But they are obviously a problem in a text message. We should remove newlines from error messages before sending the email back to the sender.
Flags: blocking3.2?
This could be fixed by wrapping it in "FILTER collapse". However, if there was any <pre> formatting in the message, it would be destroyed. I think that's OK, though. This isn't significant enough for me to actually block a release on it, but I agree that it'd be nice to fix.
Severity: normal → minor
Flags: blocking3.2? → blocking3.2-
Attached patch patch, v1 (obsolete) (deleted) — Splinter Review
Assignee: incoming.email → LpSolit
Status: NEW → ASSIGNED
Attachment #318862 - Flags: review?(mkanat)
Comment on attachment 318862 [details] [diff] [review] patch, v1 No, you should just wrap message.txt.tmpl with FILTER collapse, I think.
Attachment #318862 - Flags: review?(mkanat) → review-
Comment on attachment 318862 [details] [diff] [review] patch, v1 Okay, since you pointed out on IRC that ThrowUserError doesn't use message.txt.tmpl (nor would CodeError or TemplateError, etc.) this is the best and most centralized way to do this. However, this should be s/[\s\n]+/ /gms I think, no?
Comment on attachment 318862 [details] [diff] [review] patch, v1 message.txt.tmpl is not called by ThrowUserError().
Attachment #318862 - Flags: review- → review?(mkanat)
Comment on attachment 318862 [details] [diff] [review] patch, v1 See above comment about regex.
Attachment #318862 - Flags: review?(mkanat) → review-
Attached patch patch, v2 (deleted) — Splinter Review
The result is pretty much the same. :)
Attachment #318862 - Attachment is obsolete: true
Attachment #318864 - Flags: review?(mkanat)
Comment on attachment 318864 [details] [diff] [review] patch, v2 Looks good to me.
Attachment #318864 - Flags: review?(mkanat) → review+
Flags: approval3.0+
Flags: approval+
tip: Checking in email_in.pl; /cvsroot/mozilla/webtools/bugzilla/email_in.pl,v <-- email_in.pl new revision: 1.19; previous revision: 1.18 done 3.0.4: Checking in email_in.pl; /cvsroot/mozilla/webtools/bugzilla/email_in.pl,v <-- email_in.pl new revision: 1.5.2.12; previous revision: 1.5.2.11 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: