File tree Expand file tree Collapse file tree 7 files changed +26
-82
lines changed
dev-packages/browser-integration-tests/suites/replay Expand file tree Collapse file tree 7 files changed +26
-82
lines changed Original file line number Diff line number Diff line change 7
7
< body >
8
8
< button aria-label ="Click me " onclick ="console.log('Test log') "> Click me</ button >
9
9
< div > This should be masked by default</ div >
10
- < div data-sentry-unmask > This should be unmasked due to data attribute</ div >
10
+ < div data-sentry-unmask > With default settings, this should also be masked (even with data attribute) </ div >
11
11
< input placeholder ="Placeholder should be masked " />
12
- < input data-sentry-unmask placeholder ="Placeholder can be unmasked " />
12
+ < input data-sentry-unmask placeholder ="Placeholder can be unmasked - but not with default settings " />
13
13
< div title ="Title should be masked "> Title should be masked</ div >
14
14
< svg style ="width:200px;height:200px " viewBox ="0 0 80 80 "> < path d =""/> < area /> < rect /> </ svg >
15
15
< svg style ="width:200px;height:200px " viewBox ="0 0 80 80 " data-sentry-unblock > < path d =""/> < area /> < rect /> </ svg >
Original file line number Diff line number Diff line change 106
106
"childNodes" : [
107
107
{
108
108
"type" : 3 ,
109
- "textContent" : " This should be unmasked due to data attribute " ,
109
+ "textContent" : " **** ******* ********* **** ****** **** ** ****** ***** **** **** ********** " ,
110
110
"id" : 17
111
111
}
112
112
],
136
136
"tagName" : " input" ,
137
137
"attributes" : {
138
138
"data-sentry-unmask" : " " ,
139
- "placeholder" : " Placeholder can be unmasked "
139
+ "placeholder" : " *********** *** ** ******** * *** *** **** ******* ******** "
140
140
},
141
141
"childNodes" : [],
142
142
"id" : 21
186
186
"type" : 2 ,
187
187
"tagName" : " svg" ,
188
188
"attributes" : {
189
- "style" : " width:200px;height:200px" ,
190
- "viewBox" : " 0 0 80 80" ,
191
- "data-sentry-unblock" : " "
189
+ "rr_width" : " [200-250]px" ,
190
+ "rr_height" : " [200-250]px"
192
191
},
193
- "childNodes" : [
194
- {
195
- "type" : 2 ,
196
- "tagName" : " path" ,
197
- "attributes" : {
198
- "d" : " "
199
- },
200
- "childNodes" : [],
201
- "isSVG" : true ,
202
- "id" : 29
203
- },
204
- {
205
- "type" : 2 ,
206
- "tagName" : " area" ,
207
- "attributes" : {},
208
- "childNodes" : [],
209
- "isSVG" : true ,
210
- "id" : 30
211
- },
212
- {
213
- "type" : 2 ,
214
- "tagName" : " rect" ,
215
- "attributes" : {},
216
- "childNodes" : [],
217
- "isSVG" : true ,
218
- "id" : 31
219
- }
220
- ],
192
+ "childNodes" : [],
221
193
"isSVG" : true ,
222
194
"id" : 28
223
195
},
245
217
"type" : 2 ,
246
218
"tagName" : " img" ,
247
219
"attributes" : {
248
- "data-sentry-unblock" : " " ,
249
- "style" : " width:100px;height:100px" ,
250
- "src" : " file:///none.png"
220
+ "rr_width" : " [100-150]px" ,
221
+ "file:///none.pngrr_height" : " [100-150]px"
251
222
},
252
223
"childNodes" : [],
253
224
"id" : 35
292
263
}
293
264
},
294
265
"timestamp" : [timestamp ]
295
- }
266
+ }
Original file line number Diff line number Diff line change 106
106
"childNodes" : [
107
107
{
108
108
"type" : 3 ,
109
- "textContent" : " This should be unmasked due to data attribute " ,
109
+ "textContent" : " **** ******* ********* **** ****** **** ** ****** ***** **** **** ********** " ,
110
110
"id" : 17
111
111
}
112
112
],
248
248
}
249
249
},
250
250
"timestamp" : [timestamp ]
251
- }
251
+ }
Original file line number Diff line number Diff line change 106
106
"childNodes" : [
107
107
{
108
108
"type" : 3 ,
109
- "textContent" : " This should be unmasked due to data attribute " ,
109
+ "textContent" : " **** ****** ** ******** *** ** **** ********* " ,
110
110
"id" : 17
111
111
}
112
112
],
136
136
"tagName" : " input" ,
137
137
"attributes" : {
138
138
"data-sentry-unmask" : " " ,
139
- "placeholder" : " Placeholder can be unmasked "
139
+ "placeholder" : " *********** *** ** ******** "
140
140
},
141
141
"childNodes" : [],
142
142
"id" : 21
186
186
"type" : 2 ,
187
187
"tagName" : " svg" ,
188
188
"attributes" : {
189
- "style" : " width:200px;height:200px" ,
190
- "viewBox" : " 0 0 80 80" ,
191
- "data-sentry-unblock" : " "
192
- },
193
- "childNodes" : [
194
- {
195
- "type" : 2 ,
196
- "tagName" : " path" ,
197
- "attributes" : {
198
- "d" : " "
199
- },
200
- "childNodes" : [],
201
- "isSVG" : true ,
202
- "id" : 29
203
- },
204
- {
205
- "type" : 2 ,
206
- "tagName" : " area" ,
207
- "attributes" : {},
208
- "childNodes" : [],
209
- "isSVG" : true ,
210
- "id" : 30
211
- },
212
- {
213
- "type" : 2 ,
214
- "tagName" : " rect" ,
215
- "attributes" : {},
216
- "childNodes" : [],
217
- "isSVG" : true ,
218
- "id" : 31
219
- }
220
- ],
189
+ "rr_width" : " [200-250]px" ,
190
+ "rr_height" : " [200-250]px"
191
+ },
192
+ "childNodes" : [],
221
193
"isSVG" : true ,
222
194
"id" : 28
223
195
},
245
217
"type" : 2 ,
246
218
"tagName" : " img" ,
247
219
"attributes" : {
248
- "data-sentry-unblock" : " " ,
249
- "style" : " width:100px;height:100px" ,
250
- "src" : " file:///none.png"
220
+ "rr_width" : " [100-150]px" ,
221
+ "file:///none.pngrr_height" : " [100-150]px"
251
222
},
252
223
"childNodes" : [],
253
224
"id" : 35
292
263
}
293
264
},
294
265
"timestamp" : [timestamp ]
295
- }
266
+ }
Original file line number Diff line number Diff line change 106
106
"childNodes" : [
107
107
{
108
108
"type" : 3 ,
109
- "textContent" : " This should be unmasked due to data attribute " ,
109
+ "textContent" : " **** ******* ********* **** ****** **** ** ****** ***** **** **** ********** " ,
110
110
"id" : 17
111
111
}
112
112
],
136
136
"tagName" : " input" ,
137
137
"attributes" : {
138
138
"data-sentry-unmask" : " " ,
139
- "placeholder" : " Placeholder can be unmasked "
139
+ "placeholder" : " *********** *** ** ******** * *** *** **** ******* ******** "
140
140
},
141
141
"childNodes" : [],
142
142
"id" : 21
292
292
}
293
293
},
294
294
"timestamp" : [timestamp ]
295
- }
295
+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ window.Replay = Sentry.replayIntegration({
7
7
minReplayDuration : 0 ,
8
8
useCompression : false ,
9
9
maskAllInputs : false ,
10
+ unmask : [ '.sentry-unmask, [data-sentry-unmask]' ] ,
10
11
} ) ;
11
12
12
13
Sentry . init ( {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ window.Replay = Sentry.replayIntegration({
7
7
minReplayDuration : 0 ,
8
8
useCompression : false ,
9
9
maskAllInputs : true ,
10
+ unmask : [ '.sentry-unmask, [data-sentry-unmask]' ] ,
10
11
} ) ;
11
12
12
13
Sentry . init ( {
You can’t perform that action at this time.
0 commit comments