mirror of
https://github.com/moodle/moodle.git
synced 2025-04-06 00:42:44 +02:00
Merge branch 'MDL-55357_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
2961f1075b
@ -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'));
|
||||
}
|
||||
|
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user