mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Temporary Nuclear option on topic titles - disallow non ascii characters so we
can stay on top of the trolls. This is meant to be replaced soon with a more permissive and safe method of sanitizing.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Topic do
|
||||
@@ -24,6 +26,18 @@ describe Topic do
|
||||
|
||||
it { should rate_limit }
|
||||
|
||||
context 'topic title content' do
|
||||
|
||||
it "allows a regular title with a few ascii characters" do
|
||||
Fabricate.build(:topic, title: "hello this is my cool topic! welcome: all;").should be_valid
|
||||
end
|
||||
|
||||
it "doesn't allow non standard ascii" do
|
||||
Fabricate.build(:topic, title: "Iñtërnâtiônàlizætiøn").should_not be_valid
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
context 'topic title uniqueness' do
|
||||
|
||||
|
||||
Reference in New Issue
Block a user