Merge branch 'MDL-55357_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Dan Poltawski 2016-08-02 10:54:28 +01:00
commit 2961f1075b
2 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ class course_search_testcase extends advanced_testcase {
$this->assertEquals($course->fullname, $doc->get('title'));
// Not nice. Applying \core_search\document::set line breaks clean up.
$summary = preg_replace("/\s+/", " ", content_to_text($course->summary, $course->summaryformat));
$summary = preg_replace("/\s+/u", " ", content_to_text($course->summary, $course->summaryformat));
$this->assertEquals($summary, $doc->get('content'));
$this->assertEquals($course->shortname, $doc->get('description1'));
}

View File

@ -277,7 +277,7 @@ class document implements \renderable, \templatable {
$this->data[$fieldname] = intval($value);
} else {
// Replace all groups of line breaks and spaces by single spaces.
$this->data[$fieldname] = preg_replace("/\s+/", " ", $value);
$this->data[$fieldname] = preg_replace("/\s+/u", " ", $value);
}
return $this->data[$fieldname];