FEATURE: New setting to allow all caps posts

Adds a setting to ignore text_sentinel's check on all caps content.
This commit is contained in:
Jeff Wong
2015-11-17 12:27:44 -08:00
parent 0ede6b5ed6
commit cf86f27415
4 changed files with 8 additions and 1 deletions

View File

@ -73,7 +73,7 @@ class TextSentinel
def seems_quiet?
# We don't allow all upper case content in english
not((@text =~ /[A-Z]+/) && !(@text =~ /[^[:ascii:]]/) && (@text == @text.upcase))
SiteSetting.allow_uppercase_posts || not((@text =~ /[A-Z]+/) && !(@text =~ /[^[:ascii:]]/) && (@text == @text.upcase))
end
end