Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getServerSideSitemap does not sanitise & and throws error #780

Closed
graemegeorge opened this issue Mar 8, 2024 · 1 comment
Closed

getServerSideSitemap does not sanitise & and throws error #780

graemegeorge opened this issue Mar 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working no-issue-activity

Comments

@graemegeorge
Copy link

graemegeorge commented Mar 8, 2024

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:

  1. 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 using getServerSideSitemap

Screenshots

v4.2.3 Workaround
CleanShot 2024-03-08 at 13 04 36 CleanShot 2024-03-08 at 13 04 54

Additional context
Add any other context about the problem here.

@graemegeorge graemegeorge added the bug Something isn't working label Mar 8, 2024
Copy link

github-actions bot commented May 8, 2024

Closing this issue due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

2 participants