diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php
index 76b0c834387..043cb61e58f 100644
--- a/lib/outputcomponents.php
+++ b/lib/outputcomponents.php
@@ -2354,7 +2354,7 @@ class paging_bar implements renderable {
$displaypage = $currpage + 1;
if ($this->page == $currpage) {
- $this->pagelinks[] = $displaypage;
+ $this->pagelinks[] = html_writer::span($displaypage, 'current-page');
} else {
$pagelink = html_writer::link(new moodle_url($this->baseurl, array($this->pagevar=>$currpage)), $displaypage);
$this->pagelinks[] = $pagelink;
diff --git a/lib/tests/outputcomponents_test.php b/lib/tests/outputcomponents_test.php
index c6ab93a49ee..aa0e52b832c 100644
--- a/lib/tests/outputcomponents_test.php
+++ b/lib/tests/outputcomponents_test.php
@@ -389,7 +389,7 @@ EOF;
}
public function test_prepare() {
- $expecteda = array('1',
+ $expecteda = array('1',
'2',
'3',
'4',
@@ -400,7 +400,7 @@ EOF;
);
$expectedb = array('4',
'5',
- '6',
+ '6',
'7',
'8',
);