@ -156,6 +156,7 @@ class UrlRule extends Object
}
$tr['.'] = '\\.';
$this->_template = preg_replace('/<(\w+):?([^>]+)?>/', '<$1>', $this->pattern);
$this->pattern = '#^' . trim(strtr($this->_template, $tr), '/') . '$#u';
@ -380,6 +380,17 @@ class UrlRuleTest extends TestCase
),
array(
'with dot', // https://github.com/yiisoft/yii/issues/2945
'pattern' => 'posts.html',
'route' => 'post/index',
array('posts.html', 'post/index'),
array('postsahtml', false),
'creation only',
'pattern' => 'posts',