Page MenuHomePhabricator

Empty fragment [[#]] does not work
Closed, DeclinedPublic

Description

Author: omniplex

Description:
# should result in href="#", but it's stripped,
same effect as http://en.wikipedia.org/wiki/ with
my browser. A crude workaround preserving the # is
[{{fullurl:{{FULLPAGENAME}}}}# #].


Version: 1.7.x
Severity: normal
Platform: Other

Details

Reference
bz6588

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:20 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz6588.
bzimport added a subscriber: Unknown Object (MLST).

What is the point in an empty anchor ? We just ignore it
when it is empty, no point in having a link pointing to nothing.

ayg wrote:

See http://www.ietf.org/rfc/rfc1630.txt: "If the fragment-id is void, the hash
sign may be omitted: A void fragment-id with or without the hash sign means that
the URL refers to the whole object." However, see what the difference is (if
any) between these two links in your browser:

http://bugzilla.wikimedia.org/show_bug.cgi?id=6588
http://bugzilla.wikimedia.org/show_bug.cgi?id=6588#

In Firefox, at least, the former reloads the page, the latter jumps to the top
of the page.

ayg wrote:

Well, except that Bugzilla's URL-capturing doesn't accept empty fragments
either. You'll have to manually enter it into the URL bar to see.

ayg wrote:

Yes, I know I shouldn't have triple-posted, but anyway, all pages have id
globalWrapper at the very top. Use that instead; it's a standards-compliant way
of achieving the same effect.

http://en.wikipedia.org/wiki/Main_Page#globalWrapper