1
0
Fork 0
forked from gitea/nas

Fix ß bug in regexp for mentions and tags (#31122)

This commit is contained in:
Adam Niedzielski 2024-07-25 16:24:19 +02:00 committed by Claire
parent 0fc738a323
commit 7b7d404efe
4 changed files with 18 additions and 2 deletions

View file

@ -703,6 +703,14 @@ RSpec.describe Account do
it 'does not match URL query string' do
expect(subject.match('https://example.com/?x=@alice')).to be_nil
end
it 'matches usernames immediately following the letter ß' do
expect(subject.match('Hello toß @alice from me')[1]).to eq 'alice'
end
it 'matches usernames containing uppercase characters' do
expect(subject.match('Hello to @aLice@Example.com from me')[1]).to eq 'aLice@Example.com'
end
end
describe 'validations' do