How to enforce the output syntax when rendering a UI extension

Note that the {{uiextensions}} and {{uiextension}} macros should not have this problem. But yes, it does not help much in the case of Velocity based templates.

Sounds good. It’s also a lot easier to use, so people will be tempted to use that.

Might also worth adding a helper like $services.uix.renderExtensions('org.xwiki.platform.attachment.actions', 'html/5.0') which seems to be a pretty common use case in templates.