Skip to content
Snippets Groups Projects
Commit 0b519c3a authored by Igor Markin's avatar Igor Markin
Browse files

Add build

parent 97c22635
No related branches found
No related tags found
1 merge request!20Add seal word to plain normalisation regex
......@@ -23,10 +23,16 @@ const patchOutlookSafelinksWrappers = (text) => {
}
return text;
};
/**
* Function removes seal from the plain text.
* Function has to support the next possible file names of the seal:
* qrcode.png, qrcode-xxx.png, seal-xxx.png
* @param s
*/
const removeQRCodes = (s) => {
return s
.replace(/\[(image:\s)*qrcode.png]\s*<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>/g, "")
.replace(/<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>\s*\[(image: )*qrcode.png]/g, "");
.replace(/\[(image:\s)*(qrcode|seal).*?.png]\s*<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>/g, "")
.replace(/<https:\/\/.+(vereign\.com|vrgnservices\.com).*?>\s*\[(image: )*(qrcode|seal).*?.png]/g, "");
};
const cleanupHiddenCharacters = (s) => {
const removeSymbols = new RegExp(/[\u200B]+/g);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment