2
0

Allow @ at the end of an URL (#31124)

This commit is contained in:
Adam Niedzielski
2024-07-25 17:02:58 +02:00
committed by GitHub
parent 5f5373397f
commit 887e64efd4
2 changed files with 9 additions and 1 deletions

View File

@@ -224,6 +224,14 @@ RSpec.describe TextFormatter do
end
end
context 'when given a URL with trailing @ symbol' do
let(:text) { 'https://gta.fandom.com/wiki/TW@ Content' }
it 'matches the full URL' do
expect(subject).to include 'href="https://gta.fandom.com/wiki/TW@"'
end
end
context 'when given a URL containing unsafe code (XSS attack, visible part)' do
let(:text) { 'http://example.com/b<del>b</del>' }