https://bugzilla.wikimedia.org/show_bug.cgi?id=23607
Summary: titleparts misinterprets underscores
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: Normal
Component: ParserFunctions
AssignedTo: [email protected]
ReportedBy: [email protected]
Bug report after discussion here
http://www.mediawiki.org/wiki/Help_talk:Extension:ParserFunctions#titleparts_misinterprets_underscores
#titleparts changes underscores to blanks
"{{#titleparts:foo/foo/bar_baz||3}}" = "bar baz", but it should be "bar_baz"
and even strips them from teh end or beginning
"{{#titleparts:foo/bar_||2}}" = "bar", but it should be "bar_"
My guess is this is intended behaviour, but it's critial when handling URLs
(which seems to be the main purpose of #titleparts).
Fixing this behaviour results in dirty back and forth replacements:
{{#replace:{{#titleparts:{{#replace:{{{URL}}}|_|$TEMP$}}|...|...}}|$TEMP$|_}}
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l