Dev.to
6/25/2026

The Tracking-Link Bug That Only Breaks Signed URLs
Short summary
A bug in mail-history's email click tracking silently breaks signed URLs by failing to decode HTML entities (&) before encryption. The root cause: extracted URLs from rendered HTML contain escaped ampersands, which break Laravel signature validation after redirect. A one-line fix using html_entity_decode() solves it; a regression test prevents accidental removal.
- •HTML entities in URL query strings break signed-URL validation when extracted from rendered email HTML without decoding
- •The bug silently fails only for signed URLs (with query params), leaving normal links working—making it hard to catch
- •Solution: decode HTML entities immediately before encryption; test explicitly forbids & to prevent regression
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



