Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message belong to issue #7912 #8741

Merged
merged 2 commits into from
Apr 28, 2022
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
4 changes: 3 additions & 1 deletion src/libs/SelectionScraper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ const replaceNodes = (dom) => {
let domName = dom.name;
let domChildren;
const domAttribs = {};
let data;

// Encoding HTML chars '< >' in the text, because any HTML will be removed in stripHTML method.
if (dom.type === 'text') {
dom.setAttribute('data', Str.htmlEncode(dom.data));
data = Str.htmlEncode(dom.data);
}

// We are skipping elements which has html and body in data-testid, since ExpensiMark can't parse it. Also this data
Expand All @@ -118,6 +119,7 @@ const replaceNodes = (dom) => {

return {
...dom,
data,
name: domName,
attribs: domAttribs,
children: domChildren,
Expand Down