Encode single quotes in sitemap

This commit is contained in:
Dustin Brett 2024-02-06 22:24:28 -08:00
parent b76f382054
commit 9a6cd9f296

View File

@ -27,7 +27,7 @@ const buildFileSitemap = (path, excludePaths, callback) => {
buildFileSitemap(entryPath, excludePaths, callback);
}
} else if (![".ini", ".url"].includes(extname(entry).toLowerCase())) {
const encodedUrlEntryPath = encodeURI(urlEntryPath);
const encodedUrlEntryPath = encodeURI(urlEntryPath).replace(/'/g, "%27");
xmlUrls.push(
callback(