fix: add https:// prefix to website URLs missing scheme
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

- Fixed 14 companies with bare domain URLs (e.g. www.example.pl -> https://www.example.pl)
- Added ensure_url filter to contact bar href (was missing in one place)
- Migration 063 fixes existing data, template filter prevents future issues

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-02-21 19:22:38 +01:00
parent 902ff58d54
commit bbb43aaac7
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,10 @@
-- Migration 063: Fix website URLs missing https:// prefix
-- 14 companies have website URLs without http/https scheme
UPDATE companies
SET website = 'https://' || website,
updated_at = NOW()
WHERE website IS NOT NULL
AND website != ''
AND website NOT LIKE 'http://%'
AND website NOT LIKE 'https://%';

View File

@ -1007,7 +1007,7 @@
</a>
{% endfor %}
{% elif company.website %}
<a href="{{ company.website }}" class="contact-bar-item" target="_blank" rel="noopener noreferrer"
<a href="{{ company.website|ensure_url }}" class="contact-bar-item" target="_blank" rel="noopener noreferrer"
title="Strona internetowa firmy — {{ company.website|replace('https://', '')|replace('http://', '')|replace('www.', '') }}">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>