Clean up old title on move before reset article id
[lhc/web/wiklou.git] / includes / Html.php
index e7455b7..932f753 100644 (file)
@@ -172,7 +172,7 @@ class Html {
 
                // In text/html, initial <html> and <head> tags can be omitted under
                // pretty much any sane circumstances, if they have no attributes.  See:
-               // <http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#optional-tags>
+               // <http://www.whatwg.org/html/syntax.html#optional-tags>
                if ( !$wgWellFormedXml && !$attribs
                && in_array( $element, array( 'html', 'head' ) ) ) {
                        return '';
@@ -238,7 +238,7 @@ class Html {
                $element = strtolower( $element );
 
                // Reference:
-               // http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#optional-tags
+               // http://www.whatwg.org/html/syntax.html#optional-tags
                if ( !$wgWellFormedXml && in_array( $element, array(
                        'html',
                        'head',
@@ -422,6 +422,7 @@ class Html {
                $ret = '';
                $attribs = (array)$attribs;
                foreach ( $attribs as $key => $value ) {
+                       // Support intuitive array( 'checked' => true/false ) form
                        if ( $value === false || is_null( $value ) ) {
                                continue;
                        }
@@ -842,11 +843,11 @@ class Html {
         * @return Boolean
         */
        public static function isXmlMimeType( $mimetype ) {
-               # http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#xml-mime-type
+               # http://www.whatwg.org/html/infrastructure.html#xml-mime-type
                # * text/xml
                # * application/xml
                # * Any mimetype with a subtype ending in +xml (this implicitly includes application/xhtml+xml)
-               return (bool) preg_match( '!^(text|application)/xml$|^.+/.+\+xml$!', $mimetype );
+               return (bool)preg_match( '!^(text|application)/xml$|^.+/.+\+xml$!', $mimetype );
        }
 
        /**
@@ -902,7 +903,7 @@ class Html {
                $candidates = array();
                foreach ( $urls as $density => $url ) {
                        // Image candidate syntax per current whatwg live spec, 2012-09-23:
-                       // http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-srcset
+                       // http://www.whatwg.org/html/embedded-content-1.html#attr-img-srcset
                        $candidates[] = "{$url} {$density}x";
                }
                return implode( ", ", $candidates );