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
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