check for escaped double quotes in local part (#102)

This commit is contained in:
Roland Franssen
2016-05-02 16:04:07 +02:00
committed by Eduardo Gulias Davis
parent 8853b6bb85
commit 102932acf8
2 changed files with 4 additions and 0 deletions
@@ -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'],