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

[ BUG ] CDATA cannot be used for loc tag #445

Open
sneko opened this issue Nov 29, 2024 · 0 comments
Open

[ BUG ] CDATA cannot be used for loc tag #445

sneko opened this issue Nov 29, 2024 · 0 comments

Comments

@sneko
Copy link

sneko commented Nov 29, 2024

Hi,

I'm using v8 and when having:

<?xml version="1.0" encoding="UTF-8" ?>
<urlset
  xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml"
>
  <url>
    <loc><![CDATA[https://roosterteeth.com/episode/rouletsplay-2018-goldeneye-source]]></loc>
</urlset>

I get unhandled cdata for tag: loc. I'm directly using parseSitemap(Readable.from(content)) and it seems CDATA can be on all tags except those for location like loc, image:loc... Is it a bug or it's wanted @ekalinin ?

In my case I'm parsing third-party sitemaps so I do have the authority on the content format.

Thank you,

EDIT: in the meantime I test modifying your code to accept loc / image:loc within sitemap-parser.js (thanks to patch-package)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant