Closed Bug 1322861 Opened 8 years ago Closed 8 years ago

Link content gets downloaded and attached to message when mail.compose.attachHttp is true

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(thunderbird52 fixed, thunderbird53 fixed)

RESOLVED FIXED
Thunderbird 53.0
Tracking Status
thunderbird52 --- fixed
thunderbird53 --- fixed

People

(Reporter: jorgk-bmo, Assigned: jorgk-bmo)

References

Details

Attachments

(1 file, 2 obsolete files)

I have a signature like so: <a href="https://wiki.mozilla.org/Modules/Thunderbird#Thunderbird_Council">Thunderbird Council</a> <img moz-do-not-send="true" src="http://www.jorgk.com/images/make-tb-great-again.png" border="0"> When mail.compose.attachHttp is set to true, the link content gets downloaded and attached. Can we rename the preference to mail.compose.attachHttpImages and only attach images?
Blocks: 1322155
I think it should be like this.
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Attachment #8817835 - Flags: review?(mkmelin+mozilla)
The patch also corrects some indentation issues in the vicinity :-(
Oops, this wasn't right. You removed the "shortcut processing" above (why?), so an image with moz-do-not-send="true" set individually would still have been sent with the preference set to true. That's not right. The preference shouldn't override individual settings. I added the shortcut back in. It also saves CPU cycles, since if you already know that we don't want it, why check further?
Attachment #8817835 - Attachment is obsolete: true
Attachment #8817835 - Flags: review?(mkmelin+mozilla)
Attachment #8818110 - Flags: review?(mkmelin+mozilla)
This needed some more cleanup: - if it's not a DOM *element*, return early. - if moz-do-not-sent=true, return early. - fixed error handling for links to match other elements. - only attach images based on preference mail.compose.attachHttpImages
Attachment #8818110 - Attachment is obsolete: true
Attachment #8818110 - Flags: review?(mkmelin+mozilla)
Attachment #8818126 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8818126 [details] [diff] [review] 1322861-attach-only-images.patch (v3) Review of attachment 8818126 [details] [diff] [review]: ----------------------------------------------------------------- Wow, yes this needed fixing! r=mkmelin ::: mailnews/mailnews.js @@ +775,5 @@ > > pref("mail.compose.dontWarnMail2Newsgroup", false); > > +// Attach http image resources to composed messages. > +pref("mail.compose.attachHttpImages", false); while we're chanining, maybe make it snake_style instead of camelCase, as that's more common for prefs
Attachment #8818126 - Flags: review?(mkmelin+mozilla) → review+
https://hg.mozilla.org/comm-central/rev/e27aac8e06f47087b44858975f21712793839701 Landed with a few changes: 1) https://hg.mozilla.org/comm-central/rev/e27aac8e06f47087b44858975f21712793839701#l1.27 Checking for empty or "false" rather than "true" to make it consistent with other checking. 2) Used mail.compose.attach_http_images as discussed.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 53.0
Attachment #8818126 - Flags: approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: