Allow Chinese characters in Topic titles

This commit is contained in:
Chris Hunt
2013-05-26 13:56:42 -07:00
parent 74b661317c
commit 13c4266c74
2 changed files with 6 additions and 1 deletions

View File

@ -41,7 +41,7 @@ class TextSentinel
(@text.gsub(TextSentinel.non_symbols_regexp, '').size > 0) &&
# Don't allow super long words if there is a word length maximum
(@opts[:max_word_length].blank? || @text.split(/\W/).map(&:size).max <= @opts[:max_word_length] ) &&
(@opts[:max_word_length].blank? || @text.split(/\s/).map(&:size).max <= @opts[:max_word_length] ) &&
# We don't allow all upper case content in english
not((@text =~ /[A-Z]+/) && (@text == @text.upcase)) &&