npm i18next 27.2.3
v27.2.3

one hour ago
  • fix: a variable in the options of a nested $t(key, { "name": "{{name}}" }) is escaped once. With the default escapeValue: true it was escaped for HTML before the options were parsed and again by the nested t(), so Tom & Jerry came out as Tom & Jerry (and react-i18next's Trans has shown Tom & Jerry since 17.1.10, with escapeValue: false too). These variables are now escaped for the options' JSON, whatever escapeValue is, and the nested t() escapes them like the values of a direct call; defaultValue and joinArrays there, which it does not interpolate, stay escaped once. A value with ", ', \ or a line break no longer breaks the options, with escapeValue: false a value can no longer inject options such as lng, and with skipOnVariables a {{placeholder}} inside a value is no longer interpolated a second time. The warning added in 26.0.6 now covers {{- var}} in these options, the one form still inserted unescaped, instead of escapeValue: false.

Don't miss a new i18next release

NewReleases is sending notifications on new releases.