mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-19 13:18:59 +08:00
Resolve bug in images whitelist #201
This commit is contained in:
parent
05f45d36d1
commit
11c5b0e8f1
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue