CClientScript::renderScriptBatch() has been improved to sort html options only if they are specified.