Enhances special page links; allow some parameters to be passed via wikilinks to...
[lhc/web/wiklou.git] / includes / OutputPage.php
index 0db1ead..50748e4 100644 (file)
@@ -649,9 +649,9 @@ class OutputPage {
        #
        function doWikiPass2( $text, $linestart )
        {
-               global $wgUser;
+               global $wgUser, $wgLang;
                wfProfileIn( "OutputPage::doWikiPass2" );
-
+               
                $text = $this->removeHTMLtags( $text );
                $text = $this->replaceVariables( $text );
 
@@ -661,7 +661,8 @@ class OutputPage {
                $text = $this->doQuotes( $text );
                $text = $this->doHeadings( $text );
                $text = $this->doBlockLevels( $text, $linestart );
-
+               
+               $text = $wgLang->replaceDates( $text );
                $text = $this->replaceExternalLinks( $text );
                $text = $this->replaceInternalLinks ( $text );
 
@@ -709,7 +710,7 @@ class OutputPage {
                wfProfileOut();
                return $text;
        }
-
+       
        /* private */ function subReplaceExternalLinks( $s, $protocol, $autonumber )
        {
                global $wgUser, $printable;
@@ -1256,6 +1257,7 @@ class OutputPage {
                        
                        $canonized_headline=preg_replace("/<.*?>/","",$headline); // strip out HTML
                        $tocline=$canonized_headline;
+                       $canonized_headline=str_replace('"',"",$canonized_headline);
                        $canonized_headline=str_replace(" ","_",trim($canonized_headline));                     
                        $refer[$c]=$canonized_headline;
                        $refers[$canonized_headline]++;  // count how many in assoc. array so we can track dupes in anchors
@@ -1357,7 +1359,7 @@ class OutputPage {
        {
                global $wgDocType, $wgDTD, $wgUser, $wgLanguageCode, $wgOutputEncoding;
 
-               $ret = "<!DOCTYPE HTML PUBLIC \"$wgDocType\" \"$wgDTD\">\n";
+               $ret = "<!DOCTYPE HTML PUBLIC \"$wgDocType\"\n        \"$wgDTD\">\n";
 
                if ( "" == $this->mHTMLtitle ) {
                        $this->mHTMLtitle = $this->mPagetitle;