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 77 < body >
88 < button aria-label ="Click me " onclick ="console.log('Test log') "> Click me</ button >
99 < 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 >
1111 < 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 " />
1313 < div title ="Title should be masked "> Title should be masked</ div >
1414 < svg style ="width:200px;height:200px " viewBox ="0 0 80 80 "> < path d =""/> < area /> < rect /> </ svg >
1515 < 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 106106 "childNodes" : [
107107 {
108108 "type" : 3 ,
109- "textContent" : " This should be unmasked due to data attribute " ,
109+ "textContent" : " **** ******* ********* **** ****** **** ** ****** ***** **** **** ********** " ,
110110 "id" : 17
111111 }
112112 ],
136136 "tagName" : " input" ,
137137 "attributes" : {
138138 "data-sentry-unmask" : " " ,
139- "placeholder" : " Placeholder can be unmasked "
139+ "placeholder" : " *********** *** ** ******** * *** *** **** ******* ******** "
140140 },
141141 "childNodes" : [],
142142 "id" : 21
186186 "type" : 2 ,
187187 "tagName" : " svg" ,
188188 "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"
192191 },
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" : [],
221193 "isSVG" : true ,
222194 "id" : 28
223195 },
245217 "type" : 2 ,
246218 "tagName" : " img" ,
247219 "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"
251222 },
252223 "childNodes" : [],
253224 "id" : 35
292263 }
293264 },
294265 "timestamp" : [timestamp ]
295- }
266+ }
Original file line number Diff line number Diff line change 106106 "childNodes" : [
107107 {
108108 "type" : 3 ,
109- "textContent" : " This should be unmasked due to data attribute " ,
109+ "textContent" : " **** ******* ********* **** ****** **** ** ****** ***** **** **** ********** " ,
110110 "id" : 17
111111 }
112112 ],
248248 }
249249 },
250250 "timestamp" : [timestamp ]
251- }
251+ }
Original file line number Diff line number Diff line change 106106 "childNodes" : [
107107 {
108108 "type" : 3 ,
109- "textContent" : " This should be unmasked due to data attribute " ,
109+ "textContent" : " **** ****** ** ******** *** ** **** ********* " ,
110110 "id" : 17
111111 }
112112 ],
136136 "tagName" : " input" ,
137137 "attributes" : {
138138 "data-sentry-unmask" : " " ,
139- "placeholder" : " Placeholder can be unmasked "
139+ "placeholder" : " *********** *** ** ******** "
140140 },
141141 "childNodes" : [],
142142 "id" : 21
186186 "type" : 2 ,
187187 "tagName" : " svg" ,
188188 "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" : [],
221193 "isSVG" : true ,
222194 "id" : 28
223195 },
245217 "type" : 2 ,
246218 "tagName" : " img" ,
247219 "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"
251222 },
252223 "childNodes" : [],
253224 "id" : 35
292263 }
293264 },
294265 "timestamp" : [timestamp ]
295- }
266+ }
Original file line number Diff line number Diff line change 106106 "childNodes" : [
107107 {
108108 "type" : 3 ,
109- "textContent" : " This should be unmasked due to data attribute " ,
109+ "textContent" : " **** ******* ********* **** ****** **** ** ****** ***** **** **** ********** " ,
110110 "id" : 17
111111 }
112112 ],
136136 "tagName" : " input" ,
137137 "attributes" : {
138138 "data-sentry-unmask" : " " ,
139- "placeholder" : " Placeholder can be unmasked "
139+ "placeholder" : " *********** *** ** ******** * *** *** **** ******* ******** "
140140 },
141141 "childNodes" : [],
142142 "id" : 21
292292 }
293293 },
294294 "timestamp" : [timestamp ]
295- }
295+ }
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ window.Replay = Sentry.replayIntegration({
77 minReplayDuration : 0 ,
88 useCompression : false ,
99 maskAllInputs : false ,
10+ unmask : [ '.sentry-unmask, [data-sentry-unmask]' ] ,
1011} ) ;
1112
1213Sentry . init ( {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ window.Replay = Sentry.replayIntegration({
77 minReplayDuration : 0 ,
88 useCompression : false ,
99 maskAllInputs : true ,
10+ unmask : [ '.sentry-unmask, [data-sentry-unmask]' ] ,
1011} ) ;
1112
1213Sentry . init ( {
You can’t perform that action at this time.
0 commit comments