Skip to content
Merged
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
6 changes: 5 additions & 1 deletion lib/core/utils/dq-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ function getSource(element) {
if (!source && typeof window.XMLSerializer === 'function') {
source = new window.XMLSerializer().serializeToString(element);
}
return truncate(source || '');
let htmlString = truncate(source || '');
// Remove unwanted attributes
const regex = /\s*data-percy-[^=]+="[^"]*"/g;
htmlString = htmlString.replace(regex, '');
return htmlString;
}

/**
Expand Down
Loading