`getServerSideSitemap` does not sanitise `&` and throws error
graemegeorge opened this issue · 1 comments
graemegeorge commented
Describe the bug
Further to the fix here, #207 I've found that the error still throws when using getServerSideSitemap
. I was able to resolve it by applying .replace(/&/g, '&');
myself, but this feels like a degraded experience.
To Reproduce
Steps to reproduce the behavior:
- use a loc with an ampersand
return getServerSideSitemap([
{
loc: 'http://localhost:3000/en-us/burger-&-fries',
lastmod: new Date().toISOString(),
changefreq: 'daily',
}
]);
Expected behavior
- URLs with
&
should be sanatized when usinggetServerSideSitemap
Screenshots
v4.2.3 | Workaround |
---|---|
Additional context
Add any other context about the problem here.
github-actions commented
Closing this issue due to inactivity.