Last modified: 2013-06-26 10:34:56 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 T49011, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47011 - wiki link contained in index page are mishandled if they contain a ":"
wiki link contained in index page are mishandled if they contain a ":"
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
ProofreadPage (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: Wikisource
  Show dependency treegraph
 
Reported: 2013-04-08 12:10 UTC by Philippe Elie
Modified: 2013-06-26 10:34 UTC (History)
3 users (show)

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


Attachments

Description Philippe Elie 2013-04-08 12:10:28 UTC
Proofreadpage extension build a list of wiki link contained in an index page to be able to produce prev/next links. If an index called "foo.djvu" contains links [[A]], [[B]] and [[C]] in this order, and the tag <pages index="oo.djvu" is used on page B, the extension know the previous and next link and can create navigation links.

This is handled in Proofreadpage.body.php:parse_index_links() but title are parsed with a simple regexp $text_links_pattern = "/\[\[\s*([^:\|]*?)\s*(\|(.*?)|)\]\]/i"; the [^:\|] is needed because we want only link to main but it filter too much links, all title with a ":" are removed from the list.

Tpt suggested on IRC to use Title::newFromText then filter with ->inNamespace( NS_MAIN ). As a side effect it'll also normalize title, actually a title in index like [[Foo_bar]] or [[foo bar]] is not recognized as the same title as "Foo bar".
Comment 1 Gerrit Notification Bot 2013-06-25 10:45:09 UTC
Related URL: https://gerrit.wikimedia.org/r/70404 (Gerrit Change I2cbd16ab182e74b43401e3f9d692d48d717fa860)
Comment 2 Gerrit Notification Bot 2013-06-26 10:16:36 UTC
https://gerrit.wikimedia.org/r/70404 (Gerrit Change I2cbd16ab182e74b43401e3f9d692d48d717fa860) | change APPROVED and MERGED [by jenkins-bot]

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


Navigation
Links