mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-27 22:36:08 +00:00
Resolve bug in images whitelist #201
This commit is contained in:
@@ -292,10 +292,12 @@ export class MessageModel extends AbstractModel {
|
||||
}
|
||||
if ('match' === SettingsUserStore.viewImages()) {
|
||||
let regex = SettingsUserStore.viewImagesWhitelist()
|
||||
.trim()
|
||||
.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&')
|
||||
.replace(/[\s\S,;:]+/g, '|')
|
||||
.replace(/[\s\r\n,;:]+/g, '|')
|
||||
.replace(/\|+/g, '|');
|
||||
if (regex.length) {
|
||||
console.log('whitelist images = '+regex);
|
||||
regex = new RegExp(regex);
|
||||
this.showExternalImages(
|
||||
(this.from[0]?.email.match(regex)/* || this.sender[0]?.email.match(regex)*/) ? null : regex
|
||||
|
||||
Reference in New Issue
Block a user