Closed Bug 946073 Opened 11 years ago Closed 11 years ago

Bugzilla does not correctly linkify URLs that have multiple parameters

Categories

(Bugzilla :: User Interface, defect)

defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mail, Assigned: mail)

References

Details

Attachments

(1 file)

Attached patch url-v1.patchSplinter Review
(from the brc report, modified to show the problem) Description of problem: When a comment contains a URL with more than one parameter, Bugzilla only linkifies the base URL and the first parameter. It fails to include the second and subsequent parameters, thus forcing the user to cut and paste the full URL rather than jsut being able to click on it. For example, if a comment conbtains the following URL https://bugzilla.mozilla.org/show_bug.cgi?id=987&format=multiple The linkified portion does not include "&format=multiple". Version-Release number of selected component (if applicable): 4.4 How reproducible: 100% Steps to Reproduce: 1. View this bug report. 2. Observe that the URL above does not include "&format=multiple" in the displayed link. 3. Hover the mouse over the URL above. 4. Observe that the target of the link also omits "&format-multiple". Actual results: URL is not correctly linkified. Expected results: URL is correctly linkified. Additional info: none.
Attachment #8342153 - Flags: review?(glob)
Summary: Bug 988170 - Bugzilla does not correctly linkify URLs that have multiple parameters → Bugzilla does not correctly linkify URLs that have multiple parameters
Comment on attachment 8342153 [details] [diff] [review] url-v1.patch >=== modified file 'Bugzilla/Template.pm' >+ $text =~ s~\b(${urlbase_re}\Qshow_bug.cgi?id=\E([0-9]+)(&format=\w+)?(\#c([0-9]+))?)\b This regexp doesn't make sense. You assume that the URL is of the form show_bug.cgi?id=\d+&format=multiple but when you look at the "format for printing" link you have at the bottom right of bug reports, it is of the form show_bug.cgi?format=multiple&id=\d+. So your regexp only fixes one single possible solution which comes from no obvious place (where this URL comes from, to start with?). And then you assume that only format=\w+ can be appended to the URL while the "XML" link which is also at the bottom of bug reports is of the form show_bug.cgi?ctype=xml&id=\d+. So IMO either you really fix the regexp to work in all cases without assuming how the list of parameters looks like, or this bug in WONTFIX.
Attachment #8342153 - Flags: review?(glob) → review-
Severity: normal → minor
In further discussion with the Red Hat Bugzilla product manager, we have decided not to fix this bug in brc, and therefore I'm closing this bug too. -- simon
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
It's rather wontfix than invalid.
Resolution: INVALID → WONTFIX
Target Milestone: Bugzilla 5.0 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: