* (bug 9472) Invalid XHTML on cached query pages
authorRob Church <robchurch@users.mediawiki.org>
Sun, 1 Apr 2007 16:10:50 +0000 (16:10 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sun, 1 Apr 2007 16:10:50 +0000 (16:10 +0000)
* Use CDATA comment stuff in OutputPage::addInlineScript() as opposed to <!-- -->

RELEASE-NOTES
includes/OutputPage.php
includes/QueryPage.php

index af661c4..777abec 100644 (file)
@@ -295,6 +295,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 9241) Handle edit section links and include size links for cached
   templates the same as the first transclusion.
 * (bug 9466) "Rollback failed" page doesn't format edit comment
+* (bug 9472) Invalid XHTML on cached special pages
  
 == Maintenance ==
 * New script maintenance/language/checkExtensioni18n.php used to check i18n
index ba719a9..c932f9c 100644 (file)
@@ -77,7 +77,7 @@ class OutputPage {
         */
        function addInlineScript( $script ) {
                global $wgJsMimeType;
-               $this->mScripts .= "<script type=\"$wgJsMimeType\"><!--\n$script\n--></script>";
+               $this->mScripts .= "<script type=\"$wgJsMimeType\">/*<![CDATA[*/\n$script\n/*]]>*/</script>";
        }
 
        function getScript() { return $this->mScripts; }
index 409a9c4..75dc112 100644 (file)
@@ -307,7 +307,7 @@ class QueryPage {
                                        $updated = $wgLang->timeAndDate( $tRow->qci_timestamp, true, true );
                                        $cacheNotice = wfMsg( 'perfcachedts', $updated );
                                        $wgOut->addMeta( 'Data-Cache-Time', $tRow->qci_timestamp );
-                                       $wgOut->addScript( '<script language="JavaScript">var dataCacheTime = \'' . $tRow->qci_timestamp . '\';</script>' );
+                                       $wgOut->addInlineScript( "var dataCacheTime = '{$tRow->qci_timestamp}';" );
                                } else {
                                        $cacheNotice = wfMsg( 'perfcached' );
                                }