Make $wgDebugRawPage=false also ignore load.php, so that debug logs can be readable...
[lhc/web/wiklou.git] / includes / Html.php
index daef9e0..ce90a44 100644 (file)
@@ -107,8 +107,8 @@ class Html {
         * features might be added, like allowing arrays for the values of
         * attributes like class= and media=.
         *
-        * @param $element  string The element's name, e.g., 'a'
-        * @param $attribs  array  Associative array of attributes, e.g., array(
+        * @param $element string The element's name, e.g., 'a'
+        * @param $attribs array  Associative array of attributes, e.g., array(
         *   'href' => 'http://www.mediawiki.org/' ).  See expandAttributes() for
         *   further documentation.
         * @param $contents string The raw HTML contents of the element: *not*
@@ -132,6 +132,12 @@ class Html {
        /**
         * Identical to rawElement(), but HTML-escapes $contents (like
         * Xml::element()).
+        *
+        * @param $element string
+        * @param $attribs array
+        * @param $contents string
+        *
+        * @return string
         */
        public static function element( $element, $attribs = array(), $contents = '' ) {
                return self::rawElement( $element, $attribs, strtr( $contents, array(
@@ -145,6 +151,11 @@ class Html {
        /**
         * Identical to rawElement(), but has no third parameter and omits the end
         * tag (and the self-closing '/' in XML mode for empty elements).
+        *
+        * @param $element string
+        * @param $attribs array
+        *
+        * @return string
         */
        public static function openElement( $element, $attribs = array() ) {
                global $wgHtml5, $wgWellFormedXml;
@@ -426,7 +437,8 @@ class Html {
                                # Apparently we need to entity-encode \n, \r, \t, although the
                                # spec doesn't mention that.  Since we're doing strtr() anyway,
                                # and we don't need <> escaped here, we may as well not call
-                               # htmlspecialchars().  FIXME: verify that we actually need to
+                               # htmlspecialchars().
+                               # @todo FIXME: Verify that we actually need to
                                # escape \n\r\t here, and explain why, exactly.
                                #
                                # We could call Sanitizer::encodeAttribute() for this, but we
@@ -441,8 +453,8 @@ class Html {
                                );
                                if ( $wgWellFormedXml ) {
                                        # This is allowed per spec: <http://www.w3.org/TR/xml/#NT-AttValue>
-                                       # But reportedly it breaks some XML tools?  FIXME: is this
-                                       # really true?
+                                       # But reportedly it breaks some XML tools?
+                                       # @todo FIXME: Is this really true?
                                        $map['<'] = '&lt;';
                                }
                                $ret .= " $key=$quote" . strtr( $value, $map ) . $quote;
@@ -598,9 +610,9 @@ class Html {
        public static function htmlHeader( $attribs = array() ) {
                $ret = '';
 
-               global $wgMimeType, $wgOutputEncoding;
+               global $wgMimeType;
                if ( self::isXmlMimeType( $wgMimeType ) ) {
-                       $ret .= "<?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
+                       $ret .= "<?xml version=\"1.0\" encoding=\"UTF-8\" ?" . ">\n";
                }
 
                global $wgHtml5, $wgHtml5Version, $wgDocType, $wgDTD;