Index: trunk/phase3/includes/Parser.php |
— | — | @@ -2455,25 +2455,25 @@ |
2456 | 2456 | case 'localday2': |
2457 | 2457 | return $varCache[$index] = $wgContLang->formatNum( $localDay2 ); |
2458 | 2458 | case 'pagename': |
2459 | | - return $this->mTitle->getText(); |
| 2459 | + return wfEscapeWikiText( $this->mTitle->getText() ); |
2460 | 2460 | case 'pagenamee': |
2461 | 2461 | return $this->mTitle->getPartialURL(); |
2462 | 2462 | case 'fullpagename': |
2463 | | - return $this->mTitle->getPrefixedText(); |
| 2463 | + return wfEscapeWikiText( $this->mTitle->getPrefixedText() ); |
2464 | 2464 | case 'fullpagenamee': |
2465 | 2465 | return $this->mTitle->getPrefixedURL(); |
2466 | 2466 | case 'subpagename': |
2467 | | - return $this->mTitle->getSubpageText(); |
| 2467 | + return wfEscapeWikiText( $this->mTitle->getSubpageText() ); |
2468 | 2468 | case 'subpagenamee': |
2469 | 2469 | return $this->mTitle->getSubpageUrlForm(); |
2470 | 2470 | case 'basepagename': |
2471 | | - return $this->mTitle->getBaseText(); |
| 2471 | + return wfEscapeWikiText( $this->mTitle->getBaseText() ); |
2472 | 2472 | case 'basepagenamee': |
2473 | 2473 | return wfUrlEncode( str_replace( ' ', '_', $this->mTitle->getBaseText() ) ); |
2474 | 2474 | case 'talkpagename': |
2475 | 2475 | if( $this->mTitle->canTalk() ) { |
2476 | 2476 | $talkPage = $this->mTitle->getTalkPage(); |
2477 | | - return $talkPage->getPrefixedText(); |
| 2477 | + return wfEscapeWikiText( $talkPage->getPrefixedText() ); |
2478 | 2478 | } else { |
2479 | 2479 | return ''; |
2480 | 2480 | } |
— | — | @@ -2486,7 +2486,7 @@ |
2487 | 2487 | } |
2488 | 2488 | case 'subjectpagename': |
2489 | 2489 | $subjPage = $this->mTitle->getSubjectPage(); |
2490 | | - return $subjPage->getPrefixedText(); |
| 2490 | + return wfEscapeWikiText( $subjPage->getPrefixedText() ); |
2491 | 2491 | case 'subjectpagenamee': |
2492 | 2492 | $subjPage = $this->mTitle->getSubjectPage(); |
2493 | 2493 | return $subjPage->getPrefixedUrl(); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -174,8 +174,8 @@ |
175 | 175 | {{LOCAL*}} functions return local time per server config or $wgLocaltimezone. |
176 | 176 | Signature dates for Japanese and other languages including weekday now show |
177 | 177 | the correct day to match the rest of the time in local time. |
| 178 | +* Escape the output of magic variables that return page name or part of it |
178 | 179 | |
179 | | - |
180 | 180 | == API changes since 1.10 == |
181 | 181 | |
182 | 182 | (For ongoing development discussion, see http://www.mediawiki.org/wiki/API) |