Last modified: 2013-12-07 13:13:09 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 T54492, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52492 - {{#titleparts}} fails on URLs with URL encoded characters
{{#titleparts}} fails on URLs with URL encoded characters
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Lowest enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-03 01:25 UTC by Eduard Braun
Modified: 2013-12-07 13:13 UTC (History)
3 users (show)

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


Attachments

Description Eduard Braun 2013-08-03 01:25:01 UTC
Consider the URL
> //en.wikipedia.org/w/index.php?title=Test&action=edit&section=new&preloadtitle={{urlencode|Enter heading!}}|1}}

which expands to
> //en.wikipedia.org/w/index.php?title=Test&action=edit&section=new&preloadtitle=Enter+heading%21


Titleparts will fail on this (perfectly fine) URL when calling
> {{#titleparts://en.wikipedia.org/w/index.php?title=Test&action=edit&section=new&preloadtitle=Enter+heading%21|1}}

Actually it should return an empty string (as the URL is protocol relative) and that's actually what #titleparts does as soon as one removes the "%21" from the URL.
Comment 1 db [inactive,noenotif] 2013-08-03 15:35:46 UTC
The function is called *title*parts, not split or something else. That means you can only get parts of titles. %[0-9A-F]{2} is not allow in a title, that means it is invalid and titleparts gives the input string back.

Now you can use lua for that.

Related: bug 23607
Comment 2 db [inactive,noenotif] 2013-12-07 13:13:09 UTC
This bug is invalid, because titleparts is supposed to parse the input along to the existing title rules, which means that colon is invalid, first letter maybe uppercase and something other, like url encoded parts.

Try to use lua, when plain text split is needed.

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


Navigation
Links