Skip to content
Permalink
Browse files

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

  • Loading branch information
nadavkav committed Jan 23, 2016
1 parent ef343c3 commit 5200054dc2777fcf72022744867dd27007c6b79d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/moodlelib.php
@@ -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);

0 comments on commit 5200054

Please sign in to comment.
You can’t perform that action at this time.