mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-23 07:36:12 +08:00
fix(regex): allow "=" in valid email address
Fixes T3440 Email formatting validation bug
This commit is contained in:
parent
73dc68e46e
commit
8b86973a82
2 changed files with 2 additions and 1 deletions
|
@ -98,6 +98,7 @@ describe "ContactStore", ->
|
|||
"spang \"Christine Spang\" <noreply+phabricator@nilas.com>": [new Contact(name: "spang \"Christine Spang\"", email: "noreply+phabricator@nilas.com")]
|
||||
"Evan (evan@nylas.com)": [new Contact(name: "Evan", email: "evan@nylas.com")]
|
||||
"\"Michael\" (mg@nylas.com)": [new Contact(name: "Michael", email: "mg@nylas.com")]
|
||||
"announce-uc.1440659566.kankcagcmaacemjlnoma-security=nylas.com@lists.openwall.com": [new Contact(name: "announce-uc.1440659566.kankcagcmaacemjlnoma-security=nylas.com@lists.openwall.com", email: "announce-uc.1440659566.kankcagcmaacemjlnoma-security=nylas.com@lists.openwall.com")]
|
||||
|
||||
# Multiple contact test cases
|
||||
"Evan Morikawa <evan@nylas.com>, Ben <ben@nylas.com>": [
|
||||
|
|
|
@ -7,7 +7,7 @@ RegExpUtils =
|
|||
# It's also imporant we return a fresh copy of the RegExp every time. A
|
||||
# javascript regex is stateful and multiple functions using this method
|
||||
# will cause unexpected behavior!
|
||||
emailRegex: -> new RegExp(/([a-z.A-Z0-9%+_-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/g)
|
||||
emailRegex: -> new RegExp(/([a-z.A-Z0-9%+=_-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/g)
|
||||
|
||||
# https://regex101.com/r/zG7aW4/3
|
||||
imageTagRegex: -> /<img\s+[^>]*src="([^"]*)"[^>]*>/g
|
||||
|
|
Loading…
Reference in a new issue