Merge lp://qastaging/~jcsackett/launchpad/linkifier-bugs into lp://qastaging/launchpad
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Māris Fogels | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 12073 | ||||||||||||
Proposed branch: | lp://qastaging/~jcsackett/launchpad/linkifier-bugs | ||||||||||||
Merge into: | lp://qastaging/launchpad | ||||||||||||
Diff against target: |
64 lines (+39/-2) 2 files modified
lib/lp/app/browser/stringformatter.py (+1/-1) lib/lp/app/browser/tests/test_stringformatter.py (+38/-1) |
||||||||||||
To merge this branch: | bzr merge lp://qastaging/~jcsackett/launchpad/linkifier-bugs | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Māris Fogels (community) | Approve | ||
Review via email: mp+43677@code.qastaging.launchpad.net |
Commit message
[r=mars][ui=none][bug=85470,179868,276726] Updates the protocols recognized by the linkifier. file:// no longer supported, apt://, apt: and data: added.
Description of the change
Summary
=======
Several simple bugs have been filed against the linkifier in bug comments regarding its handling of various protocols. These are handled in this branch by simple changes to the protocol section of the regex used in the linkifier.
Preimp-talk
===========
Spoke with Curtis Hovey.
Implementation
==============
The linkifier decides which things to link based on the protocols defined in the protocol glob of a truly massive regex in lp.app.
The protocol section is modified to support apt and data uris, and to not follow file uris, as the latter is useless to anyone but the person with the file on their computer.
Tests
=====
lp test -t test_stringform
QA
==
Open launchpad.dev and file a bug against any product. In the comment section, put the following:
This links: apt:some-
As does this: apt://some-
As does this: data:text/
This does not: file://
Hi J.C.,
An excellent change, r=mars
I am surprised you have to use the DatabaseFunctio nalLayer. The formatter objects must be doing a lot of work? Could we get away with just Zope registry, or even less, in this test?
Maris