X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FHtml.php;h=aa51243d75ebe1236f7356f479c8f705960f096a;hb=aa9bbc47c3b043479aba45ab8e76b663826b780f;hp=dba4c67a72a00e5753c7adf6e6af4b2ea5d1a69d;hpb=b79bc0a2740b991525aae355ed216e0b9dc3aa86;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Html.php b/includes/Html.php
index dba4c67a72..aa51243d75 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -213,7 +213,7 @@ class Html {
// Silly XML.
return substr( $start, 0, -1 ) . '/>';
} else {
- return "$start$contents" . self::closeElement( $element );
+ return $start . $contents . self::closeElement( $element );
}
}
@@ -255,6 +255,12 @@ class Html {
// consistency and better compression.
$element = strtolower( $element );
+ // Some people were abusing this by passing things like
+ // 'h1 id="foo" to $element, which we don't want.
+ if ( strpos( $element, ' ' ) !== false ) {
+ wfWarn( __METHOD__ . " given element name with space '$element'" );
+ }
+
// Remove invalid input types
if ( $element == 'input' ) {
$validTypes = [
@@ -552,10 +558,13 @@ class Html {
}
/**
- * Output a "" or (for XML) literal "]]>".
+ * It is unsupported for the contents to contain the sequence `