Make MediaWiki:Redirectpagesub accept all wikitext.
authorSkizzerz <skizzerz@gmail.com>
Fri, 27 Dec 2013 04:41:15 +0000 (22:41 -0600)
committerSkizzerz <skizzerz@gmail.com>
Fri, 27 Dec 2013 04:41:15 +0000 (22:41 -0600)
Redirectpagesub is used as the system message for subheadings on redirect pages.
Currently, it only performs transformations of {{-style constructs whereas it
could be useful to accept a wider range of wikitext. For example, one could change
the message to "Redirect page ([[Special:WhatLinksHere/{{FULLPAGENAME}}|links]])"
so that the subtitle displays a link to Special:WhatLinksHere. Currently that does not work.

The subtitle is already in a block-level <div> so it can already handle additional
block-level elements, thus the inclusion of arbitrary wikitext shouldn't break things (too) badly.

Change-Id: Icbd29d71c325c63dfda80dfcd52ed32358a2f24e

includes/Article.php

index 821c32e..a694daf 100644 (file)
@@ -1439,7 +1439,7 @@ class Article implements Page {
 
                if ( $appendSubtitle ) {
                        $out = $this->getContext()->getOutput();
-                       $out->addSubtitle( wfMessage( 'redirectpagesub' )->escaped() );
+                       $out->addSubtitle( wfMessage( 'redirectpagesub' )->parse() );
                }
 
                // the loop prepends the arrow image before the link, so the first case needs to be outside