Skip to content

Passes: null in URL attribute drops it like in other attributes - #428

Open
vrana wants to merge 1 commit into
nette:masterfrom
vrana:check-url-null
Open

vrana wants to merge 1 commit into
nette:masterfrom
vrana:check-url-null

Conversation

@vrana

@vrana vrana commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

…reak)

Since 3.1, a null value of an attribute means the attribute is omitted. URL
attributes were an exception: the checkUrls pass appends |checkUrl, which
converts null to '', so <a href={$url}> with null rendered href="". That
makes the element a link to the current page.

The pass now appends the filter as nullsafe ?|checkUrl, so null skips it and
the attribute is dropped. With migration warnings, the change is reported like
for other attributes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant