Skip to content

Commit

Permalink
Merge pull request #25 from smahelos/bad-characters-in-extract
Browse files Browse the repository at this point in the history
FIX: Bad characters in extract due to preg_replace with php 7.0 and l…
  • Loading branch information
MrRoco authored Mar 15, 2019
2 parents 0eca8f3 + 09bcb7c commit 0821dd4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public function sanitize($text) {
* @return string The generated extract.
*/
public function createExtract($text, $length = 200, $search = '', $ellipsis = '...') {
$text = trim(preg_replace('/\s+/', ' ', $this->sanitize($text)));
$text = trim(preg_replace('/\s+/u', ' ', $this->sanitize($text)));
if (empty($text)) {
return '';
}
Expand Down

0 comments on commit 0821dd4

Please sign in to comment.