You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The creative click guard ignores <base target> when opening wrapped links #1392
The creative runtime's click guard ignores <base target> when it decides where a wrapped creative link opens.
Since #1252, a bidder <base> keeps its target and only loses its href. On POST /auction, the injected click guard calls preventDefault() on any link with data-tsclick and then navigates using only the anchor's own target (crates/trusted-server-js/lib/src/integrations/creative/click.ts:351):
The form-rebuild path does the same (click.ts:313, form.target = anchor.getAttribute('target') || '_self').
So a creative that relies on <base target="_blank"> behaves inconsistently:
POST /auction: wrapped landing links open inside the frame, while unwrapped links (relative, excluded, non-http) open in a new tab, as the browser resolves <base target> for them.
Inline SSAT/page-bids (no click guard): wrapped links open in a new tab.
docs/guide/creative-processing.md documents this limitation and the workaround: give links an explicit target.
Reproduction steps
Run an auction on POST /auction with default rewriting, where the winning creative contains <base target="_blank"> and <a href="https://landing.example.com/"> with no target.
Click the link in the rendered creative iframe.
The landing page opens inside the creative frame.
Expected behavior
The click guard resolves the effective target the way the browser does: the anchor's own target, then <base target>, then the default. For example:
Activity