Skip to content

Commit

Permalink
[NOREF] Added escapeValue false for i18n (#2676)
Browse files Browse the repository at this point in the history
* Added escapeValue false for i18n

* Linter format

* Spelling mistake
  • Loading branch information
patrickseguraoddball committed Jul 8, 2024
1 parent 59bf4e7 commit b36d099
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ const resources = {
'en-US': enUS
};

i18n.use(LanguageDetector).use(initReactI18next).init({
lng: 'en-US',
fallbackLng: 'en-US',
resources
});
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
lng: 'en-US',
fallbackLng: 'en-US',
resources,
interpolation: {
escapeValue: false // react already safe from xss => https://www.i18next.com/translation-function/interpolation#unescape
}
});

export default i18n;

0 comments on commit b36d099

Please sign in to comment.