@@ -109,11 +109,11 @@ export default function isEmail(str, options) {
109109
110110 if ( options . domain_specific_validation && ( lower_domain === 'gmail.com' || lower_domain === 'googlemail.com' ) ) {
111111 /*
112- Previously we removed dots for gmail addresses before validating.
113- This was removed because it allows `multiple..dots@gmail.com`
114- to be reported as valid, but it is not.
115- Gmail only normalizes single dots, removing them from here is pointless,
116- should be done in normalizeEmail
112+ Previously we removed dots for gmail addresses before validating.
113+ This was removed because it allows `multiple..dots@gmail.com`
114+ to be reported as valid, but it is not.
115+ Gmail only normalizes single dots, removing them from here is pointless,
116+ should be done in normalizeEmail
117117 */
118118 user = user . toLowerCase ( ) ;
119119
@@ -166,7 +166,7 @@ export default function isEmail(str, options) {
166166 if ( user . search ( new RegExp ( `[${ options . blacklisted_chars } ]+` , 'g' ) ) !== - 1 ) return false ;
167167 }
168168
169- if ( user [ 0 ] === '"' ) {
169+ if ( user [ 0 ] === '"' && user [ user . length - 1 ] === '"' ) {
170170 user = user . slice ( 1 , user . length - 1 ) ;
171171 return options . allow_utf8_local_part ?
172172 quotedEmailUserUtf8 . test ( user ) :
0 commit comments