diff --git a/cake/libs/view/helpers/paginator.php b/cake/libs/view/helpers/paginator.php index a3d948462..be521d68f 100644 --- a/cake/libs/view/helpers/paginator.php +++ b/cake/libs/view/helpers/paginator.php @@ -311,10 +311,7 @@ class PaginatorHelper extends AppHelper { if ($this->{$check}()) { return $this->link($title, $url, array_merge($options, array('escape' => $escape))); } else { - if ($escape) { - $title = h($title); - } - return sprintf('%s', $this->_parseAttributes($options), $title); + return $this->Html->div(null, $title, $options, $escape); } } /** diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index 8815cebb8..2de80b130 100644 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -85,12 +85,12 @@ class PaginatorTest extends UnitTestCase { $this->Paginator->params['paging']['Article']['nextPage'] = false; $this->Paginator->params['paging']['Article']['page'] = 1; $result = $this->Paginator->next('Next', array(), true); - $expected = 'Next'; + $expected = '