From 309ef1e363485c1336fce10c267f2222fe7c9843 Mon Sep 17 00:00:00 2001 From: Shivam7-1 <55046031+Shivam7-1@users.noreply.github.com> Date: Sat, 7 Dec 2024 08:45:28 +0530 Subject: [PATCH 1/3] Update index.js --- venia-integration-tests/src/fixtures/googleMapApi/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/venia-integration-tests/src/fixtures/googleMapApi/index.js b/venia-integration-tests/src/fixtures/googleMapApi/index.js index b633c5f97b..a50c14da94 100644 --- a/venia-integration-tests/src/fixtures/googleMapApi/index.js +++ b/venia-integration-tests/src/fixtures/googleMapApi/index.js @@ -1,3 +1,4 @@ +import DOMPurify from 'dompurify'; export const createGoogleMapApi = currentMapApi => { return { maps: { @@ -85,7 +86,7 @@ export const createGoogleMapApi = currentMapApi => { open(map) { map.infoWindowContainer.style.maxWidth = this.maxWidth; - map.infoWindowContainer.innerHTML = this.content; + map.infoWindowContainer.innerHTML = DOMPurify.sanitize(this.content); } close() { From 79108873d5bc5f4a3dda1c77dc44693af49523a1 Mon Sep 17 00:00:00 2001 From: Shivam7-1 <55046031+Shivam7-1@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:55:56 +0530 Subject: [PATCH 2/3] Updated dependencies package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 31a55218a0..d5bf518e8f 100755 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "path-to-regexp": "^8.2.0", "qs": "^6.13.0", "setimmediate": "^1.0.5" + "dompurify": "^2.3.8" }, "devDependencies": { "@babel/plugin-transform-runtime": "~7.4.4", From b05f8cc8e43a8ba109f783760caefef400360313 Mon Sep 17 00:00:00 2001 From: Shivam7-1 <55046031+Shivam7-1@users.noreply.github.com> Date: Mon, 23 Dec 2024 11:39:41 +0000 Subject: [PATCH 3/3] Fix --- package.json | 2 +- venia-integration-tests/src/fixtures/googleMapApi/index.js | 4 +++- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d5bf518e8f..43d3b4f1a7 100755 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "caniuse-lite": "~1.0.30001335", "path-to-regexp": "^8.2.0", "qs": "^6.13.0", - "setimmediate": "^1.0.5" + "setimmediate": "^1.0.5", "dompurify": "^2.3.8" }, "devDependencies": { diff --git a/venia-integration-tests/src/fixtures/googleMapApi/index.js b/venia-integration-tests/src/fixtures/googleMapApi/index.js index a50c14da94..203b1c4df0 100644 --- a/venia-integration-tests/src/fixtures/googleMapApi/index.js +++ b/venia-integration-tests/src/fixtures/googleMapApi/index.js @@ -86,7 +86,9 @@ export const createGoogleMapApi = currentMapApi => { open(map) { map.infoWindowContainer.style.maxWidth = this.maxWidth; - map.infoWindowContainer.innerHTML = DOMPurify.sanitize(this.content); + map.infoWindowContainer.innerHTML = DOMPurify.sanitize( + this.content + ); } close() { diff --git a/yarn.lock b/yarn.lock index 1c9743f74c..82ad11d9a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8935,6 +8935,11 @@ domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: dependencies: domelementtype "^2.2.0" +dompurify@^2.3.8: + version "2.5.8" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.8.tgz#2809d89d7e528dc7a071dea440d7376df676f824" + integrity sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw== + domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"