MDL-52567 Core: remove quotation marks, for proper word count

This commit is contained in:
Nadav Kavalerchik
2016-01-24 00:47:13 +02:00
parent ef343c3299
commit 5200054dc2
+1 -1
View File
@@ -7532,7 +7532,7 @@ function count_words($string) {
// Replace underscores (which are classed as word characters) with spaces.
$string = preg_replace('/_/u', ' ', $string);
// Remove any characters that shouldn't be treated as word boundaries.
$string = preg_replace('/[\'’-]/u', '', $string);
$string = preg_replace('/[\'"’-]/u', '', $string);
// Remove dots and commas from within numbers only.
$string = preg_replace('/([0-9])[.,]([0-9])/u', '$1$2', $string);