bad`;
test('private and special addresses are refused', () => {
for (const ip of ['127.0.0.1', '10.8.0.1', '192.168.1.2', '172.20.0.1', '169.254.169.254', '100.64.0.1', '::1', 'fd00::1', '::ffff:10.0.0.1', '0.0.0.0'])
expect(privateAddress(ip)).toBe(true);
for (const ip of ['93.184.216.34', '1.1.1.1', '2606:4700::1111']) expect(privateAddress(ip)).toBe(false);
});
test('sanitize keeps reading tags, makes links absolute and strips scripts/handlers', () => {
const out = sanitize('