Skip to content

Commit

Permalink
Widened the set of allowable emojis.
Browse files Browse the repository at this point in the history
refs #8368
  • Loading branch information
AntonNguyen committed Oct 7, 2017
1 parent ccdbbe1 commit d09c6bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Validation/Validation.php
Expand Up @@ -909,7 +909,7 @@ public static function url($check, $strict = false)
{
static::_populateIp();

$emoji = '\x{1F300}-\x{1F6FF}';
$emoji = '\x{1F190}-\x{1F9EF}';
$alpha = '0-9(\p{L}\p{N}' . $emoji;
$hex = '(%[0-9a-f]{2})';
$subDelimiters = preg_quote('/!"$&\'()*+,-.@_:;=~[]', '/');
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Validation/ValidationTest.php
Expand Up @@ -2181,7 +2181,7 @@ public function testUrl()
$this->assertTrue(Validation::url('http://www.electrohome.ro/images/239537750-284232-215_300[1].jpg'));
$this->assertTrue(Validation::url('http://www.eräume.foo'));
$this->assertTrue(Validation::url('http://äüö.eräume.foo'));
$this->assertTrue(Validation::url('http://www.domain.com/👹'), 'utf8Extended path failed');
$this->assertTrue(Validation::url('http://www.domain.com/👹/🧀'), 'utf8Extended path failed');

$this->assertTrue(Validation::url('http://cakephp.org:80'));
$this->assertTrue(Validation::url('http://cakephp.org:443'));
Expand Down

0 comments on commit d09c6bd

Please sign in to comment.