mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 12:34:34 +08:00
FIX: Do not wrap unaccent around tsqueries (#16284)
tsqueries use quotes and having other characters that when unaccented become quotes results in invalid tsqueries.
This commit is contained in:
@ -580,6 +580,11 @@ describe Topic do
|
||||
end
|
||||
end
|
||||
|
||||
it 'does not result in a syntax error when removing accents' do
|
||||
SiteSetting.search_ignore_accents = true
|
||||
expect(Topic.similar_to('something', "it's")).to eq([])
|
||||
end
|
||||
|
||||
it 'does not result in a syntax error when raw is blank after cooking' do
|
||||
expect(Topic.similar_to('some title', '#')).to eq([])
|
||||
end
|
||||
|
Reference in New Issue
Block a user