You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a problem in angular-i18next. But I think you can improve the usage experience by considering this i18next feature in any way. It is a problem because Angular escapes special characters too which leads to double-escaping. For example, this code {{ 'greeting' | i18next: { name: '"Google"' } }} gives this string in browser Hello, "Google"!. You can mention this feature in the readme and offer/implement one of the solutions:
Disable the escaping globally in the i18next configuration:
This is the best solution IMHO because dealing with a raw HTML in Angular is a rare case and one who deals with raw HTML would need to escape the substitutions manually anyway.
Disable the escaping in the pipe or/and in the service:
This is not a problem in angular-i18next. But I think you can improve the usage experience by considering this i18next feature in any way. It is a problem because Angular escapes special characters too which leads to double-escaping. For example, this code
{{ 'greeting' | i18next: { name: '"Google"' } }}
gives this string in browserHello, "Google"!
. You can mention this feature in the readme and offer/implement one of the solutions:Disable the escaping globally in the i18next configuration:
This is the best solution IMHO because dealing with a raw HTML in Angular is a rare case and one who deals with raw HTML would need to escape the substitutions manually anyway.
Disable the escaping in the pipe or/and in the service:
Disable the escaping in templates:
greeting: 'Hello, {{- name}}!'
The text was updated successfully, but these errors were encountered: