Skip to content

Commit

Permalink
Merge pull request #280 from MHRA/sitemap-cdata
Browse files Browse the repository at this point in the history
Wrap URLs in CDATA sections so ampersands aren't processed as entities.
  • Loading branch information
TimboTambo authored Jan 30, 2020
2 parents a2c4b1b + 8bc4aab commit 1f6cfe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion medicines/web/src/tools/sitemap-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const createSiteMapString = async () => {
.map(
path =>
`<url>` +
`<loc>${BASE_URL}${path}</loc>` +
`<loc><![CDATA[${BASE_URL}${path}]]></loc>` +
`<lastmod>${moment(pathsObj[path].lastModified).format(
YYY_MM_DD,
)}</lastmod>` +
Expand Down

0 comments on commit 1f6cfe9

Please sign in to comment.