Well, in our repo we've got more than `1k+` occurrences of `<script` string. In `/extensions/wikia/` there are only `351` usages of this string. I recall MediaWiki `Xml` class and today I found `Html` class which is in MW from 1.16 version. The `Html::linkedScript()` is being used 48 times in our codebase whereas different variations of `Xml::element()` or  `Xml::openElement()` with `script` in total `6` times. `Html::linkedScript()` is being used also in `JSMessages` so I'll go with this solution, I guess :)