mirror of
https://github.com/discourse/discourse.git
synced 2025-09-12 21:10:47 +08: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:
parent
f1a3e76d2b
commit
2d2b907d2c
3 changed files with 31 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue