Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<div data-sentry-unmask>This should be unmasked due to data attribute</div>
<input placeholder="Placeholder should be masked" />
<div title="Title should be masked">Title should be masked</div>
<svg style="width:200px;height:200px" viewBox="0 0 80 80"><path d=""/></svg>
<svg style="width:200px;height:200px" class="sentry-unblock" viewBox="0 0 80 80" data-sentry-unblock><path d=""/></svg>
<svg style="width:200px;height:200px" viewBox="0 0 80 80"><path d=""/><area /><rect /></svg>
<svg style="width:200px;height:200px" viewBox="0 0 80 80" data-sentry-unblock><path d=""/><area /><rect /></svg>
<img style="width:100px;height:100px" src="file:///none.png" />
<img data-sentry-unblock style="width:100px;height:100px" src="file:///none.png" />
</body>
Expand Down
32 changes: 23 additions & 9 deletions packages/integration-tests/suites/replay/privacy/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
tagName: 'svg',
attributes: {
style: 'width:200px;height:200px',
class: 'sentry-unblock',
viewBox: '0 0 80 80',
'data-sentry-unblock': '',
},
Expand All @@ -199,21 +198,36 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
type: 2,
tagName: 'path',
attributes: {
rr_width: '0px',
rr_height: '0px',
d: '',
},
childNodes: [],
isSVG: true,
id: 26,
},
{
type: 2,
tagName: 'area',
attributes: {},
childNodes: [],
isSVG: true,
id: 27,
},
{
type: 2,
tagName: 'rect',
attributes: {},
childNodes: [],
isSVG: true,
id: 28,
},
],
isSVG: true,
id: 25,
},
{
type: 3,
textContent: '\n ',
id: 27,
id: 29,
},
{
type: 2,
Expand All @@ -223,12 +237,12 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
rr_height: '100px',
},
childNodes: [],
id: 28,
id: 30,
},
{
type: 3,
textContent: '\n ',
id: 29,
id: 31,
},
{
type: 2,
Expand All @@ -239,17 +253,17 @@ sentryTest('should have the correct default privacy settings', async ({ getLocal
src: 'file:///none.png',
},
childNodes: [],
id: 30,
id: 32,
},
{
type: 3,
textContent: '\n ',
id: 31,
id: 33,
},
{
type: 3,
textContent: '\n\n',
id: 32,
id: 34,
},
],
id: 7,
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/src/integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { RecordingOptions, ReplayConfiguration, ReplayPluginOptions } from
import { getPrivacyOptions } from './util/getPrivacyOptions';
import { isBrowser } from './util/isBrowser';

const MEDIA_SELECTORS = 'img,image,svg,path,rect,area,video,object,picture,embed,map,audio';
const MEDIA_SELECTORS = 'img,image,svg,video,object,picture,embed,map,audio';

let _initialized = false;

Expand Down
4 changes: 2 additions & 2 deletions packages/replay/test/integration/integrationSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Integration | integrationSettings', () => {
const { replay } = await mockSdk({ replayOptions: { blockSelector: '' } });

expect(replay['_recordingOptions'].blockSelector).toMatchInlineSnapshot(
'",.sentry-block,[data-sentry-block],img,image,svg,path,rect,area,video,object,picture,embed,map,audio"',
'",.sentry-block,[data-sentry-block],img,image,svg,video,object,picture,embed,map,audio"',
);
});

Expand All @@ -27,7 +27,7 @@ describe('Integration | integrationSettings', () => {
});

expect(replay['_recordingOptions'].blockSelector).toMatchInlineSnapshot(
'"[data-test-blockSelector],.sentry-block,[data-sentry-block],img,image,svg,path,rect,area,video,object,picture,embed,map,audio"',
'"[data-test-blockSelector],.sentry-block,[data-sentry-block],img,image,svg,video,object,picture,embed,map,audio"',
);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/replay/test/integration/rrweb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Integration | rrweb', () => {
});
expect(mockRecord.mock.calls[0][0]).toMatchInlineSnapshot(`
Object {
"blockSelector": ".sentry-block,[data-sentry-block],img,image,svg,path,rect,area,video,object,picture,embed,map,audio",
"blockSelector": ".sentry-block,[data-sentry-block],img,image,svg,video,object,picture,embed,map,audio",
"collectFonts": true,
"emit": [Function],
"ignoreSelector": ".sentry-test-ignore,.sentry-ignore,[data-sentry-ignore]",
Expand Down