Fix link sanitization for outgoing text/html and text/markdown toots

Fixes #1739
This commit is contained in:
Claire
2022-04-11 08:40:18 +02:00
parent 9309c53d21
commit f2b2614d0a
2 changed files with 10 additions and 2 deletions

View File

@ -50,6 +50,14 @@ RSpec.describe AdvancedTextFormatter do
end
end
context 'given text with a local-domain mention' do
let(:text) { 'foo https://cb6e6126.ngrok.io/about/more' }
it 'creates a link' do
is_expected.to include '<a href="https://cb6e6126.ngrok.io/about/more"'
end
end
context 'given text containing linkable mentions' do
let(:preloaded_accounts) { [Fabricate(:account, username: 'alice')] }
let(:text) { '@alice' }