Skip to content

Commit

Permalink
Fix filter Chinese words
Browse files Browse the repository at this point in the history
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 b67f716
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/filterlib.php
Expand Up @@ -997,8 +997,8 @@ function filter_phrases($text, &$link_array, $ignoretagsopen=NULL, $ignoretagscl
/// Invalid prefixes and suffixes for the fullmatch searches /// Invalid prefixes and suffixes for the fullmatch searches
/// Every "word" character, but the underscore, is a invalid suffix or prefix. /// 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. /// (nice to use this because it includes national characters (accents...) as word characters.
$filterinvalidprefixes = '([^\W_])'; $filterinvalidprefixes = '([a-zA-Z])';
$filterinvalidsuffixes = '([^\W_])'; $filterinvalidsuffixes = '([a-zA-Z])';


/// Add the user defined ignore tags to the default list /// Add the user defined ignore tags to the default list
/// Unless specified otherwise, we will not replace within <a></a> tags /// Unless specified otherwise, we will not replace within <a></a> tags
Expand Down

0 comments on commit b67f716

Please sign in to comment.