diff --git a/package-lock.json b/package-lock.json index 80c39b7bd0..663839c39f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31540,9 +31540,9 @@ } }, "node_modules/react-i18next": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.3.0.tgz", - "integrity": "sha512-FlR9xjYHSPIJfQspEmkN0yOlxgRyNuiJKJ8gCaZH08UJ7SZHG+VrptEPcpEMEchjNoCOZdKcvJ3PnmHEZhkeXg==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.3.1.tgz", + "integrity": "sha512-JAtYREK879JXaN9GdzfBI4yJeo/XyLeXWUsRABvYXiFUakhZJ40l+kaTo+i+A/3cKIED41kS/HAbZ5BzFtq/Og==", "dev": true, "dependencies": { "@babel/runtime": "^7.22.5", @@ -39536,7 +39536,7 @@ "react-dom": "^17.0.2", "react-error-boundary": "^2.3.1", "react-google-recaptcha": "^3.1.0", - "react-i18next": "^13.3.0", + "react-i18next": "^13.3.1", "react-linkify": "^1.0.0-alpha", "react-refresh": "^0.14.0", "react-resizable-panels": "^0.0.55", @@ -47762,7 +47762,7 @@ "react-dom": "^17.0.2", "react-error-boundary": "^2.3.1", "react-google-recaptcha": "^3.1.0", - "react-i18next": "^13.3.0", + "react-i18next": "^13.3.1", "react-linkify": "^1.0.0-alpha", "react-refresh": "^0.14.0", "react-resizable-panels": "^0.0.55", @@ -66856,9 +66856,9 @@ } }, "react-i18next": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.3.0.tgz", - "integrity": "sha512-FlR9xjYHSPIJfQspEmkN0yOlxgRyNuiJKJ8gCaZH08UJ7SZHG+VrptEPcpEMEchjNoCOZdKcvJ3PnmHEZhkeXg==", + "version": "13.3.1", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.3.1.tgz", + "integrity": "sha512-JAtYREK879JXaN9GdzfBI4yJeo/XyLeXWUsRABvYXiFUakhZJ40l+kaTo+i+A/3cKIED41kS/HAbZ5BzFtq/Og==", "dev": true, "requires": { "@babel/runtime": "^7.22.5", diff --git a/services/web/package.json b/services/web/package.json index 1d0719c4a2..20030cd05a 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -317,7 +317,7 @@ "react-dom": "^17.0.2", "react-error-boundary": "^2.3.1", "react-google-recaptcha": "^3.1.0", - "react-i18next": "^13.3.0", + "react-i18next": "^13.3.1", "react-linkify": "^1.0.0-alpha", "react-refresh": "^0.14.0", "react-resizable-panels": "^0.0.55", diff --git a/services/web/test/frontend/infrastructure/i18n.spec.tsx b/services/web/test/frontend/infrastructure/i18n.spec.tsx index 6e22bb302e..75e4527dfc 100644 --- a/services/web/test/frontend/infrastructure/i18n.spec.tsx +++ b/services/web/test/frontend/infrastructure/i18n.spec.tsx @@ -116,5 +116,32 @@ describe('i18n', function () { .should('have.length', 1) .should('have.text', "T&e'sting") }) + + it('does not convert markup in values to components', function () { + const Test = () => { + return ( +
+ ]} // eslint-disable-line react/jsx-key + values={{ + institutionName: "T&e'sting", + }} + shouldUnescape + tOptions={{ interpolation: { escapeValue: true } }} + /> +
+ ) + } + cy.mount() + cy.findByTestId('container') + .should( + 'have.text', + "Are you still at T&e'sting?" + ) + .find('b') + .should('have.length', 1) + .should('have.text', "T&e'sting") + }) }) })