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
crawl/sitemap-valid: a bare-year <lastmod> fails the whole sitemap with a parse error #687
Summary. A sitemap entry with a bare-year <lastmod>, such as <lastmod>2024</lastmod>, makes crawl/sitemap-valid report the whole file as Parse error: entry.lastmod?.trim is not a function, and none of its URLs are read. YYYY is a valid W3C Datetime, which the sitemap protocol uses for lastmod.
Cause.parseSitemap in packages/crawler/src/sitemaps.ts runs fast-xml-parser with its default value parsing, which hands a numeric text node through as a number, and the extractor calls .trim() on it. A numeric <priority> is handled; <lastmod> and <changefreq> are not.
Activity
fix(crawler): never read the text around markup as a sitemap value; c…
fix(crawler): a bare-year sitemap lastmod no longer fails the whole s…
fix(crawler): never read the text around markup as a sitemap value; c…
fix(crawler): report a raw < in a sitemap index lastmod; document the…
fix(crawler): a bare-year lastmod no longer fails the whole sitemap, …