We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80b022c commit 1be13b9Copy full SHA for 1be13b9
lib/core/utils/dq-element.js
@@ -26,7 +26,11 @@ function getSource(element) {
26
if (!source && typeof window.XMLSerializer === 'function') {
27
source = new window.XMLSerializer().serializeToString(element);
28
}
29
- return truncate(source || '');
+ let htmlString = truncate(source || '');
30
+ // Remove unwanted attributes
31
+ const regex = /\s*data-percy-[^=]+="[^"]*"/g;
32
+ htmlString = htmlString.replace(regex, '');
33
+ return htmlString;
34
35
36
/**
0 commit comments