Fixes #5806: Allow `Html::encode()` to be used when the application is not started