mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix for foreign language titles: Only enforce upper case rule on english alphabet.
This commit is contained in:
@@ -54,8 +54,8 @@ class TextSentinel
|
||||
|
||||
return false if @opts[:max_word_length] and @text =~ /\w{#{@opts[:max_word_length]},}(\s|$)/
|
||||
|
||||
# We don't allow all upper case content
|
||||
return false if @text == @text.upcase
|
||||
# We don't allow all upper case content in english
|
||||
return false if (@text =~ /[A-Z]+/) and (@text == @text.upcase)
|
||||
|
||||
true
|
||||
end
|
||||
|
Reference in New Issue
Block a user