Merge "Normalize input to TitleParser::parseTitle()"
[lhc/web/wiklou.git] / includes / content / JavaScriptContent.php
index 69ed8d4..e637798 100644 (file)
@@ -60,7 +60,7 @@ class JavaScriptContent extends TextContent {
                // @todo Make pre-save transformation optional for script pages
                // See T34858
 
-               $text = $this->getNativeData();
+               $text = $this->getText();
                $pst = $wgParser->preSaveTransform( $text, $title, $user, $popts );
 
                return new static( $pst );
@@ -72,7 +72,7 @@ class JavaScriptContent extends TextContent {
        protected function getHtml() {
                $html = "";
                $html .= "<pre class=\"mw-code mw-js\" dir=\"ltr\">\n";
-               $html .= htmlspecialchars( $this->getNativeData() );
+               $html .= htmlspecialchars( $this->getText() );
                $html .= "\n</pre>\n";
 
                return $html;
@@ -101,7 +101,7 @@ class JavaScriptContent extends TextContent {
                        return $this->redirectTarget;
                }
                $this->redirectTarget = null;
-               $text = $this->getNativeData();
+               $text = $this->getText();
                if ( strpos( $text, '/* #REDIRECT */' ) === 0 ) {
                        // Extract the title from the url
                        preg_match( '/title=(.*?)\\\\u0026action=raw/', $text, $matches );