In case of the following code Html::rawElement, Html::element or Html::openElement should warn that the elment name contains a space, because the attribute should be passed in the attributes array.
Code from OpenStackManager SpecialNova.php
$elementWithId = "h2 id=\"$projectName\""; $out = Html::rawElement( $elementWithId, , "$projectNameOut $actionOut" );
Html::openElement can also throw, but it could be hard to find all places before the throw is deployed to production. So having wfWarn or other kind of logging would be ok