Truncated links in Launchpad mailing lists automatic messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Barry Warsaw |
Bug Description
Automatic messages sent from Launchpad mailing lists are wrapped at 72 characters.
Unfortunately, this includes any links in the message, which makes them unusable as such (i.e. they cannot be clicked) when they are truncated in this way.
Here's an example:
"
A message has been posted to the mailing list for your team, but this
message requires your approval before it will be sent to the list
members. After reviewing the message, you may approve, discard or
reject it.
To review all messages pending approval, visit:
https:/
moderate
"
This is the extract from a request for moderation e-mail sent from a Launchpad mailing list. Notice the truncated link at the end of the message, which cannot be clicked, but rather needs to be copied and pasted to the browser's address bar.
A suggestion would be not to wrap (truncate) links.
I do not think this is specific to the e-mail client receiving the message, but just for the record I'm using Evolution 2.26.
Related branches
- Abel Deuring (community): Approve (code)
-
Diff: 147 lines (+98/-5)3 files modifiedlib/canonical/launchpad/doc/textformatting.txt (+76/-0)
lib/canonical/launchpad/mailnotification.py (+6/-1)
lib/lp/services/mail/mailwrapper.py (+16/-4)
affects: | launchpad-foundations → launchpad-registry |
Changed in launchpad-registry: | |
importance: | Undecided → Low |
status: | New → Triaged |
tags: | added: mailing-lists |
Changed in launchpad-registry: | |
status: | Triaged → In Progress |
assignee: | nobody → Barry Warsaw (barry) |
Changed in launchpad-registry: | |
milestone: | none → 3.1.11 |
Changed in launchpad-registry: | |
status: | In Progress → Fix Committed |
Changed in launchpad-registry: | |
status: | Fix Committed → Fix Released |
The branch I've linked doesn't fix the bug, but it demonstrates the problem. It turns out that textwrap (the Python module) will wrap lines at hyphens, even if those hyphens occur within URLs.
To run the unit test: mail.tests. test_mailwrappe r
./bin/test -cvv lp.services.
If you like waiting for doctests:
./bin/test -1cvvt textformatting
It might be that the cheapest fix for this is to change the URL from +mailinglist- moderate to something without hyphens.
For reference: launchpad/ emailtemplates/ new-held- message. txt launchpad. mailnotificatio n.notify_ message_ held registry/ doc/message- holds-xmlrpc. txt registry/ doc/message- holds.txt services/ mailman/ doc/postings. txt registry/ browser/ configure. zcml registry/ browser/ person. py registry/ stories/ mailinglists/ moderation. txt
* template in lib/canonical/
* mail handler in canonical.
* If you want to change the template text, you will have to edit:
* lib/lp/
* lib/lp/
* lib/lp/
* If you want to change the URL, you'll have to edit:
* lib/lp/
* lib/lp/
* lib/lp/
* and all the above.
Hope this helps,
jml