Fix for r41837 -- apply HTML stripping to explicit alt text as well as implicit.
[lhc/web/wiklou.git] / includes / Feed.php
index 503b43b..b702f86 100644 (file)
@@ -52,9 +52,6 @@ class FeedItem {
                $this->Comments = $Comments;
        }
 
-       /**
-        * @static
-        */
        function xmlEncode( $string ) {
                $string = str_replace( "\r\n", "\n", $string );
                $string = preg_replace( '/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $string );
@@ -146,12 +143,13 @@ class ChannelFeed extends FeedItem {
         * @private
         */
        function outXmlHeader() {
-               global $wgServer, $wgStylePath, $wgStyleVersion;
+               global $wgStylePath, $wgStyleVersion;
 
                $this->httpHeaders();
-               echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
+               echo '<?xml version="1.0"?>' . "\n";
                echo '<?xml-stylesheet type="text/css" href="' .
-                       htmlspecialchars( "$wgServer$wgStylePath/common/feed.css?$wgStyleVersion" ) . '"?' . ">\n";
+                       htmlspecialchars( wfExpandUrl( "$wgStylePath/common/feed.css?$wgStyleVersion" ) ) .
+                       '"?' . ">\n";
        }
 }
 
@@ -299,5 +297,3 @@ class AtomFeed extends ChannelFeed {
        </feed><?php
        }
 }
-
-?>