FIX: Disallow zero-width and other non-printing characters in tags (#11546)

This commit is contained in:
Daniel Waterworth
2020-12-22 09:27:37 -06:00
committed by GitHub
parent c9381beb9c
commit a4fb28ccd8
2 changed files with 6 additions and 1 deletions

View File

@@ -546,6 +546,10 @@ describe DiscourseTagging do
SiteSetting.force_lowercase_tags = false
expect(DiscourseTagging.clean_tag("HeLlO")).to eq("HeLlO")
end
it "removes zero-width spaces" do
expect(DiscourseTagging.clean_tag("hel\ufefflo")).to eq("hello")
end
end
end