fix(wildlife): point the Acartia card link only at acartia.io

The card's "Acartia" link was built from the contributor-supplied
photo_url, so any https site could appear labelled as Acartia. Acartia
has no documented per-sighting page, so the source link is now always
the Acartia site, on the server projection and again in the card.
The separate "Open on Acartia" fallback link is no longer needed.
This commit is contained in:
Sameh Khamis committed 2026-11-05 16:05:02 -08:00
1 parent 82138478d0
commit 3cb30c3f97
16 files changed
+45 -29

No files matched your search

@@ -330,7 +330,7 @@ test('Acartia requires flat provider text, handles trust, and sanitizes type', (
);
});
test('Acartia rejects invalid times/positions and unsafe photo links become the canonical page', () => {
test('Acartia rejects invalid times/positions and its link is always the Acartia site', () => {
for (const overrides of [
{ created: new Date(now - 8 * 24 * hour - 1).toISOString() },
{ created: new Date(now + 10 * 60_000 + 1).toISOString() },
@@ -341,6 +341,10 @@ test('Acartia rejects invalid times/positions and unsafe photo links become the
])
assert.deepEqual(normalizeAcartiaSightings([sighting(overrides)], now), []);
for (const photo_url of [
// A contributor-supplied URL is never labelled as the Acartia source.
'https://provider.example/photo.jpg',
'https://phishing.example/acartia.io/login',
'https://acartia.io.attacker.example/',
'http://provider.example/p.jpg',
'https://user:[email protected]/p.jpg',
'javascript:bad()',
@@ -349,7 +353,7 @@ test('Acartia rejects invalid times/positions and unsafe photo links become the
]) {
assert.equal(
normalizeAcartiaSightings([sighting({ photo_url })], now)[0].link,
'https://acartia.io',
'https://acartia.io/',
);
}
});