Last modified: 2011-11-14 16:36:32 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 T34248, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32248 - Nested variables with some special character output will output "" or other useless stuff
Nested variables with some special character output will output "" or other u...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-07 21:55 UTC by Daniel A. R. Werner
Modified: 2011-11-14 16:36 UTC (History)
2 users (show)

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


Attachments

Description Daniel A. R. Werner 2011-11-07 21:55:11 UTC
When using variables outputting some special characters like "'" nested like:
"[[:{{TALKPAGENAME:{{FULLPAGENAME:Isn't anything}} }}]]" will output a literal "[[:Diskussion:Isn't anything]]" instead of displaying a link.

This is because their output is escaped with wfEscapeWikiText(). This also regards {{#ifeq:...}} where comparing variables output with text no longer works as one would expect.

Is it really necessary to run the whole wfEscapeWikiText() over variables output? For example escaping the ' ' after 'ISBN ' to ' ' looks like a bad hack and kind of unnecessary to me. Even post-processing everything 'ISBN\s\d+' would seem a better solution to me.

"{{TALKPAGENAME:{{FULLPAGENAMEE:Isn't anything}} }}" (don't miss the extra "E") won't work as well since 'TALKPAGENAME' will consider the 'FULLPAGENAMEE' invalid since it contains '&' as "'" becomes "'".
Comment 1 Mark A. Hershberger 2011-11-10 16:52:09 UTC
This is marked 1.17 -- have you tested on 1.18?
Comment 2 Daniel A. R. Werner 2011-11-10 17:03:38 UTC
Alright, the link thing works in 1.18! Just {{#ifeq: {{FULLPAGENAME:Isn't anything}} | Isn't anything | true }} still won't work but I think this is described in other bugs already.
Comment 3 db [inactive,noenotif] 2011-11-14 16:36:32 UTC
"[[:{{TALKPAGENAME:{{FULLPAGENAME:Isn't anything}} }}]]" works for me on trunk.

{{FULLPAGENAMEE:Isn't anything}} }} is giving Isn%27t_anything, but that is rejected by {{TALKPAGENAME:Isn%27t_anything}} and {{TALKPAGENAMEE:Isn%27t_anything}} because "URL percent encoding sequences interfere with the ability to round-trip titles -- you can't link to them consistently." (Title::getTitleInvalidRegex)

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


Navigation
Links