X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHtml.php;h=14456e4beeeedda2653a73b889021a28082b716d;hb=6d5c59d905349fe960b7dac8f95332f0f56ba0a2;hp=5be67ab6d99471e0b8527c69d7c4c092579d767a;hpb=4728e613832a731db7fcb1b5abf841dc0e805ab1;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Html.php b/includes/Html.php
index 5be67ab6d9..14456e4bee 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -48,7 +48,7 @@
* @since 1.16
*/
class Html {
- # List of void elements from HTML5, section 8.1.2 as of 2011-08-12
+ // List of void elements from HTML5, section 8.1.2 as of 2011-08-12
private static $voidElements = array(
'area',
'base',
@@ -68,8 +68,8 @@ class Html {
'wbr',
);
- # Boolean attributes, which may have the value omitted entirely. Manually
- # collected from the HTML5 spec as of 2011-08-12.
+ // Boolean attributes, which may have the value omitted entirely. Manually
+ // collected from the HTML5 spec as of 2011-08-12.
private static $boolAttribs = array(
'async',
'autofocus',
@@ -97,7 +97,7 @@ class Html {
'selected',
'truespeed',
'typemustmatch',
- # HTML5 Microdata
+ // HTML5 Microdata
'itemscope',
);
@@ -139,7 +139,7 @@ class Html {
$start = self::openElement( $element, $attribs );
if ( in_array( $element, self::$voidElements ) ) {
if ( $wgWellFormedXml ) {
- # Silly XML.
+ // Silly XML.
return substr( $start, 0, -1 ) . ' />';
}
return $start;
@@ -160,8 +160,8 @@ class Html {
*/
public static function element( $element, $attribs = array(), $contents = '' ) {
return self::rawElement( $element, $attribs, strtr( $contents, array(
- # There's no point in escaping quotes, >, etc. in the contents of
- # elements.
+ // There's no point in escaping quotes, >, etc. in the contents of
+ // elements.
'&' => '&',
'<' => '<'
) ) );
@@ -179,19 +179,19 @@ class Html {
public static function openElement( $element, $attribs = array() ) {
global $wgHtml5, $wgWellFormedXml;
$attribs = (array)$attribs;
- # This is not required in HTML5, but let's do it anyway, for
- # consistency and better compression.
+ // This is not required in HTML5, but let's do it anyway, for
+ // consistency and better compression.
$element = strtolower( $element );
- # In text/html, initial and
tags can be omitted under
- # pretty much any sane circumstances, if they have no attributes. See:
- #
+ // In text/html, initial and tags can be omitted under
+ // pretty much any sane circumstances, if they have no attributes. See:
+ //
if ( !$wgWellFormedXml && !$attribs
&& in_array( $element, array( 'html', 'head' ) ) ) {
return '';
}
- # Remove invalid input types
+ // Remove invalid input types
if ( $element == 'input' ) {
$validTypes = array(
'hidden',
@@ -206,7 +206,7 @@ class Html {
'button',
);
- # Allow more input types in HTML5 mode
+ // Allow more input types in HTML5 mode
if( $wgHtml5 ) {
$validTypes = array_merge( $validTypes, array(
'datetime',
@@ -234,6 +234,13 @@ class Html {
unset( $attribs['maxlength'] );
}
+ // According to standard the default type for