-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[astro-rss] @astrojs/rss from 1.1.0 encode HTML in tags (instead of usage CDATA) and remove CDATA from customData #5677
Comments
Is this still an issue in 2.x? |
@matthewp yes, it is. Tested |
Will look into it |
This seems to be intentionally disallowed by #5550. Is there a way to add the custom data you want without undoing protections introduced by that PR? |
Yep, will be cool, if will be option to escape only |
This seems to still be an issue with 4.0.7. Can you clarify what your workaround was exactly? |
@JaneSmith as I wrote previously - I am stop using "@astrojs/rss" and just form rss myself // src/pages/rss.xml.js
export const GET = async () => {
const result = generateRssToString()
return new Response(result, {
headers: {
'Content-Type': 'application/xml'
}
});
} |
What version of
astro
are you using?1.7.2
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
yarn
What operating system are you using?
Mac
Describe the Bug
Problem reproduced on @astrojs/rss >= 1.1.0.
@astrojs/rss till version 1.1.0 use
CDATA
to safely define any content indescription
tag. But started from 1.1.0 it just using encode all tags, if they present in XML tags. This lead, that in rss content was readable as valid HTML withCDATA
, now it just show in some RSS readers as encoded HTML content. Added screenshotsAny tags inside
customData
withCDATA
converted to encoded data withoutCDATA
inside. Example:Converted to result on screenshot
Current solution is to use 1.0.3 and do not upgrade @astrojs/rss.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-jgvjth?file=src/pages/rss.xml.js
Participation
The text was updated successfully, but these errors were encountered: