diff --git a/packages/replay-internal/src/util/getPrivacyOptions.ts b/packages/replay-internal/src/util/getPrivacyOptions.ts index 90ef5a3facee..a5aa3d392632 100644 --- a/packages/replay-internal/src/util/getPrivacyOptions.ts +++ b/packages/replay-internal/src/util/getPrivacyOptions.ts @@ -25,7 +25,7 @@ function getOption(selectors: string[], defaultSelectors: string[]): string { * Returns privacy related configuration for use in rrweb */ export function getPrivacyOptions({ mask, unmask, block, unblock, ignore }: GetPrivacyOptions): GetPrivacyReturn { - const defaultBlockedElements = ['base[href="/"]', 'iframe[srcdoc]:not([src])']; + const defaultBlockedElements = ['base', 'iframe[srcdoc]:not([src])']; const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]']); const unmaskSelector = getOption(unmask, []); diff --git a/packages/replay-internal/test/integration/integrationSettings.test.ts b/packages/replay-internal/test/integration/integrationSettings.test.ts index 6e075c933759..8f7f39fdcf1a 100644 --- a/packages/replay-internal/test/integration/integrationSettings.test.ts +++ b/packages/replay-internal/test/integration/integrationSettings.test.ts @@ -18,7 +18,7 @@ describe('Integration | integrationSettings', () => { const { replay } = await mockSdk({ replayOptions: { blockAllMedia: false } }); expect(replay['_recordingOptions'].blockSelector).toBe( - '.sentry-block,[data-sentry-block],base[href="/"],iframe[srcdoc]:not([src])', + '.sentry-block,[data-sentry-block],base,iframe[srcdoc]:not([src])', ); }); }); diff --git a/packages/replay-internal/test/integration/rrweb.test.ts b/packages/replay-internal/test/integration/rrweb.test.ts index da1c785aadb6..cd3fbcd095be 100644 --- a/packages/replay-internal/test/integration/rrweb.test.ts +++ b/packages/replay-internal/test/integration/rrweb.test.ts @@ -23,7 +23,7 @@ describe('Integration | rrweb', () => { }); expect(mockRecord.mock.calls[0]?.[0]).toMatchInlineSnapshot(` { - "blockSelector": ".sentry-block,[data-sentry-block],base[href="/"],iframe[srcdoc]:not([src]),img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]", + "blockSelector": ".sentry-block,[data-sentry-block],base,iframe[srcdoc]:not([src]),img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]", "collectFonts": true, "emit": [Function], "errorHandler": [Function], @@ -62,7 +62,7 @@ describe('Integration | rrweb', () => { expect(mockRecord.mock.calls[0]?.[0]).toMatchInlineSnapshot(` { - "blockSelector": ".sentry-block,[data-sentry-block],base[href="/"],iframe[srcdoc]:not([src]),img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]", + "blockSelector": ".sentry-block,[data-sentry-block],base,iframe[srcdoc]:not([src]),img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]", "checkoutEveryNms": 360000, "collectFonts": true, "emit": [Function], diff --git a/packages/replay-internal/test/unit/util/getPrivacyOptions.test.ts b/packages/replay-internal/test/unit/util/getPrivacyOptions.test.ts index 2f4ac4d72113..3123e3efaa7c 100644 --- a/packages/replay-internal/test/unit/util/getPrivacyOptions.test.ts +++ b/packages/replay-internal/test/unit/util/getPrivacyOptions.test.ts @@ -21,7 +21,7 @@ describe('Unit | util | getPrivacyOptions', () => { }), ).toMatchInlineSnapshot(` { - "blockSelector": ".custom-block,.sentry-block,[data-sentry-block],base[href="/"],iframe[srcdoc]:not([src])", + "blockSelector": ".custom-block,.sentry-block,[data-sentry-block],base,iframe[srcdoc]:not([src])", "ignoreSelector": ".custom-ignore,.sentry-ignore,[data-sentry-ignore],input[type="file"]", "maskTextSelector": ".custom-mask,.sentry-mask,[data-sentry-mask]", "unblockSelector": ".custom-unblock",