mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-09-01 04:59:18 +00:00
check for escaped double quotes in local part (#102)
This commit is contained in:
committed by
Eduardo Gulias Davis
parent
8853b6bb85
commit
102932acf8
@@ -92,6 +92,9 @@ class LocalPart extends Parser
|
||||
$this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
|
||||
$setSpecialsWarning = false;
|
||||
}
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) {
|
||||
$this->lexer->moveNext();
|
||||
}
|
||||
|
||||
$this->lexer->moveNext();
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ class RFCValidationTest extends \PHPUnit_Framework_TestCase
|
||||
['"user,name"@example.com'],
|
||||
['"user name"@example.com'],
|
||||
['"user@name"@example.com'],
|
||||
['"user\"name"@example.com'],
|
||||
['"\a"@iana.org'],
|
||||
['"test\ test"@iana.org'],
|
||||
['""@iana.org'],
|
||||
|
||||
Reference in New Issue
Block a user