W3C home > Mailing lists > Public > public-wiki-dev@w3.org > October to December 2007

fixed extension:CSS so HTML is valid again

From: Sandro Hawke <sandro@w3.org>
Date: Sat, 29 Dec 2007 15:02:04 -0500
To: public-wiki-dev@w3.org
Message-ID: <27817.1198958524@ubuhebe>


As I mentioned before, extension:CSS was broken and made the generated
pages not valid HTML.  I gave up on waiting for it to be fixed by its
developers and fixed it myself.

I reported it on http://www.mediawiki.org/wiki/Extension_talk:CSS

It was a one-line fix to jubjub:/var/www/mediawiki/extensions/CSS.php,
as below.

    -- Sandro


*** CSS.php-as-distributed      2007-09-29 07:07:37.000000000 -0400
--- CSS.php     2007-12-29 09:27:46.000000000 -0500
***************
*** 32,37 ****
--- 32,39 ----
                global $wgOut;
                $parser->mOutput->mCacheTime = -1;
                $url = Title::newFromText($css)->getLocalURL('action=raw&ctype=text/css');
+               # line added sandro@w3.org 2007-12-29 to make valid html
+               $url = str_replace("&", "&amp;", $url);
                $wgOut->addScript("<link rel=\"stylesheet\" type=\"text/css\" href=\"$url\" />");
                return '';
                }
Received on Saturday, 29 December 2007 20:03:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:19:17 GMT