Skip to content

Commit

Permalink
fix: Set interpolation.escapeValue to false (#1563)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaachinman authored Dec 4, 2021
1 parent 16cb931 commit c9056a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config/createConfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ describe('createConfig', () => {
expect(config.strictMode).toEqual(true)
expect(config.use).toEqual([])
expect(config.react?.useSuspense).toEqual(false)
expect(config.interpolation).toBeUndefined()
expect(config.interpolation?.escapeValue).toEqual(false)
expect(config.interpolation?.format).toBeUndefined()

expect(fs.existsSync).toHaveBeenCalledTimes(1)
expect(fs.readdirSync).toHaveBeenCalledTimes(1)
Expand Down Expand Up @@ -200,7 +201,8 @@ describe('createConfig', () => {
expect(config.strictMode).toEqual(true)
expect(config.use).toEqual([])
expect(config.react?.useSuspense).toEqual(false)
expect(config.interpolation).toBeUndefined()
expect(config.interpolation?.escapeValue).toEqual(false)
expect(config.interpolation?.format).toBeUndefined()
})

it('deep merges backend', () => {
Expand Down
3 changes: 3 additions & 0 deletions src/config/defaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export const defaultConfig = {
get initImmediate(): boolean {
return process.browser && typeof window !== 'undefined'
},
interpolation: {
escapeValue: false,
},
load: 'currentOnly',
localeExtension: LOCALE_EXTENSION,
localePath: LOCALE_PATH,
Expand Down

1 comment on commit c9056a5

@vercel
Copy link

@vercel vercel bot commented on c9056a5 Dec 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.