Last modified: 2014-11-13 19:28:51 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 T49651, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47651 - Honor $wgLegalTitleChars in wiki link targets
Honor $wgLegalTitleChars in wiki link targets
Status: NEW
Product: Parsoid
Classification: Unclassified
tokenizer (Other open bugs)
unspecified
All All
: Lowest normal
: ---
Assigned To: Parsoid Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-25 15:17 UTC by Gabriel Wicke
Modified: 2014-11-13 19:28 UTC (History)
4 users (show)

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


Attachments

Description Gabriel Wicke 2013-04-25 15:17:47 UTC
The valid chars in titles are configurable in MediaWiki via the $wgLegalTitleChars global. We should expose this through the API (general section I presume), and use it in our tokenizer to recognize the relevant chars.
Comment 1 C. Scott Ananian 2013-04-25 15:30:14 UTC
See https://gerrit.wikimedia.org/r/60852 which fixed our link parser to recognize the default $wgLegalTitleChars.  The PHP parser uses this regexp to match links at Parser.php around line 1780:

	$tc = Title::legalChars() . '#%';
	# Match a link having the form [[namespace:link|alternate]]trail
	$e1 = "/^([{$tc}]+)(?:\\|(.+?))?]](.*)\$/sD";

Where Title::legalChars() just returns $wgLegalTitleChars.
Comment 2 Gerrit Notification Bot 2014-11-13 17:37:49 UTC
Change 173051 had a related patch set uploaded by Arlolra:
(Bug 47651) Expose legalTitleChars through the API

https://gerrit.wikimedia.org/r/173051
Comment 3 Gerrit Notification Bot 2014-11-13 18:18:00 UTC
Change 173051 had a related patch set uploaded by Arlolra:
Expose legaltitlechars through the API

https://gerrit.wikimedia.org/r/173051
Comment 4 Gerrit Notification Bot 2014-11-13 18:42:48 UTC
Change 173051 merged by jenkins-bot:
Expose legaltitlechars through the API

https://gerrit.wikimedia.org/r/173051

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


Navigation
Links