https://bugzilla.wikimedia.org/show_bug.cgi?id=47011
Web browser: ---
Bug ID: 47011
Summary: wiki link contained in index page are mishandled if
they contain a ":"
Product: MediaWiki extensions
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ProofreadPage
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
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".
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l