Last modified: 2011-07-20 19:12: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 T31970, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29970 - Better handling of linked parameters in parser functions
Better handling of linked parameters in parser functions
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-19 20:49 UTC by Gustronico
Modified: 2011-07-20 19:12 UTC (History)
1 user (show)

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


Attachments

Description Gustronico 2011-07-19 20:49:35 UTC
Handling and comparison of already-linked parameters are sometimes necessary.
Just see these unexpected results:

*{{TALKPAGENAME: [[Foo]] }} →               (expected Talk:Foo)
*{{#ifexist: [[Piano]] |yes|no}} → no       (expected yes)
*{{NAMESPACE:[[Help:Bar]]}} →               (expected Help)
*{{fullurl:[[Article]]|query}} →            (expected proper url)

I request the addition of automatic delinking capability to all parser
functions, proved that the parameter is a whole and unique link (ie.
not a string with some portions linked).
Comment 1 Brion Vibber 2011-07-19 23:56:57 UTC
This seems to mostly be a repeat of bug 29926. Hypothetically one could probably do this, but that'll mainly just increase the likelihood that something that's *not* a whole and unique link will also get thrown in there, and it still won't work. A parameter that is incorrectly filled with a single link could also be a single link with a reference, or two links, or an image, or something else. If you actually needed it to be a *page title* then make sure it's actually a page title, and don't invite random markup!

Again I recommend correctly factoring the template & template parameters to begin with.
Comment 2 Gustronico 2011-07-20 19:12:32 UTC
(In reply to comment #1)
Are you sure it will MAINLY and JUST do that? I don't think so.

What it will mainly do is to increase the likelihood that something that currently does not work will properly be parsed. Those few things that aren't whole and unique links and will happen to get thrown in there will *still* not work, as they currently don't. But those many that *are* what is expected will do.

Of course, this proposal is intended to be done only for namespaces- and pagenames-related functions.

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


Navigation
Links