In messages.en.yml, I have
messages.en.yml
confirmed: Congrats %username%, your account is now activated.
But I want to \'bold\' username to
In my opinion, this is the best solution today:
'key'|trans({'%username%': '' ~ suspiciousVar|escape ~ ''})|raw
The only risk here is stored XSS in your translation files.