Merge remote-tracking branch 'parent/main' into upstream-20240731
This commit is contained in:
commit
8b09a57a91
320 changed files with 3132 additions and 1643 deletions
|
@ -129,6 +129,24 @@ RSpec.describe LinkDetailsExtractor do
|
|||
include_examples 'structured data'
|
||||
end
|
||||
|
||||
context 'with the first tag is null' do
|
||||
let(:html) { <<~HTML }
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<script type="application/ld+json">
|
||||
null
|
||||
</script>
|
||||
<script type="application/ld+json">
|
||||
#{ld_json}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
|
||||
include_examples 'structured data'
|
||||
end
|
||||
|
||||
context 'with preceding block of unsupported LD+JSON' do
|
||||
let(:html) { <<~HTML }
|
||||
<!doctype html>
|
||||
|
|
|
@ -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>' }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue