Skip to content

Comments

Skip empty URL string returned from toSitemapTag()#577

Merged
freekmurze merged 1 commit intospatie:mainfrom
ekateiva:feature/empty-url
Aug 25, 2025
Merged

Skip empty URL string returned from toSitemapTag()#577
freekmurze merged 1 commit intospatie:mainfrom
ekateiva:feature/empty-url

Conversation

@ekateiva
Copy link
Contributor

Google does not support empty URL in the sitemap.

To not introduce a breaking change in the method's toSitemapTag() signature (null), we can skip empty strings to not generate invalid XML file.

Google does not support empty URL in the sitemap
@freekmurze freekmurze merged commit 64ca0b3 into spatie:main Aug 25, 2025
7 checks passed
@freekmurze
Copy link
Member

Thanks!

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.

2 participants