Last modified: 2014-07-11 23:48:31 UTC
From the linked URL: ---- {{PAGESINCATEGORY:{{PAGENAME}}}} doesn't work if {{PAGENAME}} contains ' (it will display 0) Its {{PAGENAME}} which is the problem, because it works if you change it with the title in clear text. ---- This can be tested for https://www.mediawiki.org/wiki/Category:Chris_G%27s_botclasses Indeed, if I use {{subst:PAGENAME}} and hit "show changes", I see it's being substituted as "Chris G's botclasses". I don't know why {{subst:PAGENAME}} is giving HTML encoded entities as output, but that's odd. Since fixing this may break things, PAGESINCATEGORY should check for HTML entities and decode them to check for pagename, just as it was done in bug 35628
The problem is not alone with pagesincategory, all other parser functions which takes a title have this problem, see also bug 16474.
There's a workaround which is to redecode the parameter of PAGESINCATEGORY with #titleparts. But I'ms still convinced that we should not have to use this trick in wikicode, given that there should not exist any valid category name containing verbatic character entities (it is still possible that they exist, because we have allowed litteral ampersands in pagenames without requring them to be HTML-encoded with named entities, so this causees an ambiguity (but I'm not convinced that we have any valid page name containing verbatim named entities; and not that it's impossible to include verbatic sharp signs "#" so you cannot inclide verbatim numeric entities). So what we could do is to HTML-encode quotes, ampersands, and lower-than/greater-than signs, by using numeric entities, instead of named entities (" ' < >), so that they can safely be URL-decoded by PAGESINCATEGORIES (which would continue to treat named entities as verbatim without decoding them automatically like numeric entities.)
Change 145724 had a related patch set uploaded by Brian Wolff: Have Title::makeTitleSafe decode html entities. https://gerrit.wikimedia.org/r/145724