Browse files

Fix filter Chinese words

Official moodle can not seperate words in Chinese. So that tons of
filters does not work.
  • Loading branch information...
sunner committed Aug 11, 2011
1 parent 80eb52c commit b67f716ca5b33b9259d00220cbbecec43c46f62e
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/filterlib.php
@@ -997,8 +997,8 @@ function filter_phrases($text, &$link_array, $ignoretagsopen=NULL, $ignoretagscl
/// Invalid prefixes and suffixes for the fullmatch searches
/// Every "word" character, but the underscore, is a invalid suffix or prefix.
/// (nice to use this because it includes national characters (accents...) as word characters.
$filterinvalidprefixes = '([^\W_])';
$filterinvalidsuffixes = '([^\W_])';
$filterinvalidprefixes = '([a-zA-Z])';
$filterinvalidsuffixes = '([a-zA-Z])';
/// Add the user defined ignore tags to the default list
/// Unless specified otherwise, we will not replace within <a></a> tags

0 comments on commit b67f716

Please sign in to comment.