X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FHtml.php;h=aa51243d75ebe1236f7356f479c8f705960f096a;hb=aa9bbc47c3b043479aba45ab8e76b663826b780f;hp=ad0130bf8f0dfc28e0a791b4132330174c848a50;hpb=32fd2342e5648ec7d37eecb00fc4044a3a7526a9;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Html.php b/includes/Html.php
index ad0130bf8f..aa51243d75 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -22,6 +22,7 @@
*
* @file
*/
+use MediaWiki\MediaWikiServices;
/**
* This class is a collection of static functions that serve two purposes:
@@ -212,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 );
}
}
@@ -254,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 = [
@@ -551,10 +558,13 @@ class Html {
}
/**
- * Output a "" or (for XML) literal "]]>".
+ * It is unsupported for the contents to contain the sequence `