Closed
Bug 660691
Opened 13 years ago
Closed 13 years ago
Allow Bugzilla to parse HTML-only inbound email
Categories
(Bugzilla :: Incoming Email, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.4
People
(Reporter: mkanat, Assigned: mkanat)
References
Details
Attachments
(1 file, 1 obsolete file)
3.85 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
Some people send email with only HTML in it. We should make email_in.pl able to parse and accept this email, by turning it into text.
Assignee | ||
Comment 1•13 years ago
|
||
I'm using HTML::FormatText::WithLinks. I've only done a bit of testing, but I'm going to go work on another patch and wanted to post this one since it was basically done. HTML::FormatText::WithLinks is minorly buggy (doesn't parse <pre> properly, reported to RT) but it's far better than not being able to process the email at all.
Assignee | ||
Comment 2•13 years ago
|
||
Oh, and also, this requires the patch from the blocker.
Comment 3•13 years ago
|
||
Comment on attachment 536157 [details] [diff] [review] v1 >+ { >+ package => 'HTML-FormatText-WithLinks', >+ module => 'HTML::FormatText::WithLinks', Why not simply using HTML::Parser, which is already in our list of optional modules?
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to comment #3) > Why not simply using HTML::Parser, which is already in our list of optional > modules? Because that's not a module that converts HTML to text, it's just an HTML parser.
Comment on attachment 536157 [details] [diff] [review] v1 Review of attachment 536157 [details] [diff] [review]: ----------------------------------------------------------------- this looks mostly good; there's even rpms and ppms for this module :) shame it doesn't support tables. you need to change the wording of the 'email_no_text_plain' error message, and you should also update the comment in get_body_and_attachments to indicate the error is thrown if the email does not contain any text/plain or html parts. ::: email_in.pl @@ +342,5 @@ > + return _decode_body($charset, $part->body); > + } > + # If we find a text/html body, decode it, but don't return > + # it immediately, because there might be a text/plain alternative > + # later. This could be any HTML type. it would be better to remember the html part and decode it only if a text/plain part is not found.
Attachment #536157 -
Flags: review?(glob) → review-
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to comment #5) > you need to change the wording of the 'email_no_text_plain' error message, > and you should also update the comment in get_body_and_attachments to > indicate the error is thrown if the email does not contain any text/plain or > html parts. Ah, yeah, thanks! > it would be better to remember the html part and decode it only if a > text/plain part is not found. That's what it's doing, actually.
Assignee | ||
Comment 7•13 years ago
|
||
Okay, I fixed the error message.
Attachment #536157 -
Attachment is obsolete: true
Attachment #537388 -
Flags: review?
Assignee | ||
Updated•13 years ago
|
Attachment #537388 -
Flags: review? → review?(glob)
Comment on attachment 537388 [details] [diff] [review] v2 Review of attachment 537388 [details] [diff] [review]: ----------------------------------------------------------------- r=glob
Attachment #537388 -
Flags: review?(glob) → review+
Assignee | ||
Comment 9•13 years ago
|
||
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified email_in.pl modified Bugzilla/Install/Requirements.pm modified template/en/default/global/user-error.html.tmpl Committed revision 7904.
Flags: approval? → approval+
Assignee | ||
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•