Last modified: 2013-10-29 10:52:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58303, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56303 - mw.Title should provide a function to get a Title object from a link
mw.Title should provide a function to get a Title object from a link
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.22.0
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-29 09:34 UTC by Michael M.
Modified: 2013-10-29 10:52 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2013-10-29 09:34:22 UTC
Like the new Title.newFromImg method a method to get the Title object for a link or its href attribute would be very useful. Such a function would have to:
* Check that the link is a local link.
* Get the title either from the title parameter or from the path.
* Unescape it and create a title object.

Currently gadgets that need to determine the title for a given link mostly use the title attribute of the link (and temporarily broke on bug 542, and regularly break if other gadgets change the title, and don't work for missing pages, which have a "page does not exist" in the title). Having a function that takes care to get everything right would help very much in programming gadgets, and would make bug 38598 comment 3 really true.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links