Skip to content
Snippets Groups Projects

Ability to search and filter Inbox(Emails and Documents)

Merged Alexey Lunin requested to merge 553-filter-interactions into master
@@ -120,14 +120,14 @@ export const extractHtmlBodyFromString = string => {
@@ -120,14 +120,14 @@ export const extractHtmlBodyFromString = string => {
const extractBodyRegex = /<body.*?>([\s\S]+)<\/body>/gm;
const extractBodyRegex = /<body.*?>([\s\S]+)<\/body>/gm;
const bodyMatch = extractBodyRegex.exec(string);
const bodyMatch = extractBodyRegex.exec(string);
let body;
let body = string;
if (bodyMatch && bodyMatch[1]) {
if (bodyMatch && bodyMatch[1]) {
body = bodyMatch[1]
body = bodyMatch[1];
.replace(/>\s+</gm, "><")
.replace(/<!--[\s\S]*?-->/gm, "")
.trim();
}
}
return body;
return body
 
.replace(/>\s+</gm, "><")
 
.replace(/<!--[\s\S]*?-->/gm, "")
 
.trim();
};
};
Loading