Page MenuHomePhabricator

Bugzilla doesn't render [[%]] correctly
Closed, ResolvedPublic

Description

Author: dbenbenn

Description:
In the Bugzilla view for this very bug, [[%]] should link to
http://en.wikipedia.org/wiki/%25 not http://en.wikipedia.org/wiki/%


Version: unspecified
Severity: minor

Details

Reference
bz5268

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:09 PM
bzimport set Reference to bz5268.

Er, no. That's exactly what it does do.

dbenbenn wrote:

No it doesn't. Try clicking here: [[%]]. The page source has

<a href="http://en.wikipedia.org/wiki/%">[[%]]</a>

so if you click on the link produced by [[%]] you get a 400 Bad Request, instead
of being taken to the article entitled %.

Ok, Safari is being too smart for its own good and is "correcting" the URL, to the
degree that it shows the corrected URL in the status bar on hover and links to it.

CWRofAUS wrote:

The reason for this is that the percent sign (%) is an escape character in the
URL scheme. %XX is equivalent to a the character with ASCII value XX (in
hexidecimal). For example, the left prenthesis '(' has ASCII value 40, so it has
hex value x28, and can be entered into URLs as %28.

The percent sign has ASCII value 37, which is x25, so the URL
http://en.wikipedia.org/wiki/%25 would take you to the page entitled "%". Right
now the URL has a percent sign with nothing after it, and the server just plain
doesn't know how it should handle it, so you get a bad request.

Bulk-assigning open BZ issues to Fred.

fvassard wrote:

I don't see the problem here.
Like Charles explained, this is an escape char, so it is properly translated. Why do you want to use [[%]] ?

Bracket links should work just as they do in the wiki.
So [[%]] should lead to article with title %. If people wanted url % semantics (why?) they'd use full urls.

It's probably just changing the url escape function.

  • Bug 5449 has been marked as a duplicate of this bug. ***

Bulk assign Bugzilla related issues to pdhanda: current maintainer