Merge "resourceloader: Move expandModuleNames() to ResourceLoader.php"
[lhc/web/wiklou.git] / includes / specials / SpecialVersion.php
index 35c5689..2632092 100644 (file)
@@ -106,7 +106,7 @@ class SpecialVersion extends SpecialPage {
                                }
 
                                $out->setPageTitle( $this->msg( 'version-credits-title', $extName ) );
                                }
 
                                $out->setPageTitle( $this->msg( 'version-credits-title', $extName ) );
-                               $out->addWikiText( $wikiText );
+                               $out->addWikiTextAsInterface( $wikiText );
                                break;
 
                        case 'license':
                                break;
 
                        case 'license':
@@ -129,12 +129,12 @@ class SpecialVersion extends SpecialPage {
                                }
 
                                $out->setPageTitle( $this->msg( 'version-license-title', $extName ) );
                                }
 
                                $out->setPageTitle( $this->msg( 'version-license-title', $extName ) );
-                               $out->addWikiText( $wikiText );
+                               $out->addWikiTextAsInterface( $wikiText );
                                break;
 
                        default:
                                $out->addModuleStyles( 'mediawiki.special.version' );
                                break;
 
                        default:
                                $out->addModuleStyles( 'mediawiki.special.version' );
-                               $out->addWikiText(
+                               $out->addWikiTextAsInterface(
                                        $this->getMediaWikiCredits() .
                                        $this->softwareInformation() .
                                        $this->getEntryPointInfo()
                                        $this->getMediaWikiCredits() .
                                        $this->softwareInformation() .
                                        $this->getEntryPointInfo()
@@ -146,7 +146,7 @@ class SpecialVersion extends SpecialPage {
                                        $this->getParserTags() .
                                        $this->getParserFunctionHooks()
                                );
                                        $this->getParserTags() .
                                        $this->getParserFunctionHooks()
                                );
-                               $out->addWikiText( $this->getWgHooks() );
+                               $out->addWikiTextAsInterface( $this->getWgHooks() );
                                $out->addHTML( $this->IPInfo() );
 
                                break;
                                $out->addHTML( $this->IPInfo() );
 
                                break;
@@ -206,6 +206,7 @@ class SpecialVersion extends SpecialPage {
                        'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Antoine Musso',
                        'Timo Tijhof', 'Daniel Kinzler', 'Jeroen De Dauw', 'Brad Jorsch',
                        'Bartosz Dziewoński', 'Ed Sanders', 'Moriel Schottlender',
                        'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Antoine Musso',
                        'Timo Tijhof', 'Daniel Kinzler', 'Jeroen De Dauw', 'Brad Jorsch',
                        'Bartosz Dziewoński', 'Ed Sanders', 'Moriel Schottlender',
+                       'Kunal Mehta', 'James D. Forrester', 'Brian Wolff', 'Adam Shorland',
                        $othersLink, $translatorsLink
                ];
 
                        $othersLink, $translatorsLink
                ];
 
@@ -703,7 +704,7 @@ class SpecialVersion extends SpecialPage {
                                [ 'class' => 'mw-version-ext-name' ]
                        );
                } else {
                                [ 'class' => 'mw-version-ext-name' ]
                        );
                } else {
-                       $extensionNameLink = $extensionName;
+                       $extensionNameLink = htmlspecialchars( $extensionName );
                }
 
                // ... and the version information
                }
 
                // ... and the version information
@@ -716,7 +717,7 @@ class SpecialVersion extends SpecialPage {
                $vcsDate = null;
 
                if ( isset( $extension['version'] ) ) {
                $vcsDate = null;
 
                if ( isset( $extension['version'] ) ) {
-                       $canonicalVersion = $out->parseInline( $extension['version'] );
+                       $canonicalVersion = $out->parseInlineAsInterface( $extension['version'] );
                }
 
                if ( isset( $extension['path'] ) ) {
                }
 
                if ( isset( $extension['path'] ) ) {
@@ -792,7 +793,7 @@ class SpecialVersion extends SpecialPage {
                if ( isset( $extension['name'] ) ) {
                        $licenseName = null;
                        if ( isset( $extension['license-name'] ) ) {
                if ( isset( $extension['name'] ) ) {
                        $licenseName = null;
                        if ( isset( $extension['license-name'] ) ) {
-                               $licenseName = new HtmlArmor( $out->parseInline( $extension['license-name'] ) );
+                               $licenseName = new HtmlArmor( $out->parseInlineAsInterface( $extension['license-name'] ) );
                        } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
                                $licenseName = $this->msg( 'version-ext-license' )->text();
                        }
                        } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
                                $licenseName = $this->msg( 'version-ext-license' )->text();
                        }
@@ -829,7 +830,7 @@ class SpecialVersion extends SpecialPage {
                } else {
                        $description = '';
                }
                } else {
                        $description = '';
                }
-               $description = $out->parseInline( $description );
+               $description = $out->parseInlineAsInterface( $description );
 
                // ... now get the authors for this extension
                $authors = $extension['author'] ?? [];
 
                // ... now get the authors for this extension
                $authors = $extension['author'] ?? [];
@@ -981,11 +982,11 @@ class SpecialVersion extends SpecialPage {
                                $list[] = $text;
                        } elseif ( substr( $item, -5 ) == ' ...]' ) {
                                $hasOthers = true;
                                $list[] = $text;
                        } elseif ( substr( $item, -5 ) == ' ...]' ) {
                                $hasOthers = true;
-                               $list[] = $this->getOutput()->parseInline(
+                               $list[] = $this->getOutput()->parseInlineAsInterface(
                                        substr( $item, 0, -4 ) . $this->msg( 'version-poweredby-others' )->text() . "]"
                                );
                        } else {
                                        substr( $item, 0, -4 ) . $this->msg( 'version-poweredby-others' )->text() . "]"
                                );
                        } else {
-                               $list[] = $this->getOutput()->parseInline( $item );
+                               $list[] = $this->getOutput()->parseInlineAsInterface( $item );
                        }
                }
 
                        }
                }
 
@@ -1177,9 +1178,9 @@ class SpecialVersion extends SpecialPage {
                foreach ( $entryPoints as $message => $value ) {
                        $url = wfExpandUrl( $value, PROTO_RELATIVE );
                        $out .= Html::openElement( 'tr' ) .
                foreach ( $entryPoints as $message => $value ) {
                        $url = wfExpandUrl( $value, PROTO_RELATIVE );
                        $out .= Html::openElement( 'tr' ) .
-                               // ->text() looks like it should be ->parse(), but this function
+                               // ->plain() looks like it should be ->parse(), but this function
                                // returns wikitext, not HTML, boo
                                // returns wikitext, not HTML, boo
-                               Html::rawElement( 'td', [], $this->msg( $message )->text() ) .
+                               Html::rawElement( 'td', [], $this->msg( $message )->plain() ) .
                                Html::rawElement( 'td', [], Html::rawElement( 'code', [], "[$url $value]" ) ) .
                                Html::closeElement( 'tr' );
                }
                                Html::rawElement( 'td', [], Html::rawElement( 'code', [], "[$url $value]" ) ) .
                                Html::closeElement( 'tr' );
                }