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

Plugin cannot handle & symbol #34

Closed
RichardJECooke opened this issue Jun 15, 2022 · 4 comments
Closed

Plugin cannot handle & symbol #34

RichardJECooke opened this issue Jun 15, 2022 · 4 comments
Labels
education open-question Further information is requested from the original poster.

Comments

@RichardJECooke
Copy link

RichardJECooke commented Jun 15, 2022

I'm using all the default code copied and pasted from https://www.11ty.dev/docs/plugins/rss/.

When viewing the resulting .xml page on my site, the browser tells me there is invalid xml in this line:

<title>Deploying Azure web apps (faster) & remote debugging</title>

I don't think the plugin escapes the & sign correctly in posts it adds.

@zachleat zachleat added the open-question Further information is requested from the original poster. label Jun 15, 2022
@zachleat
Copy link
Member

If you’re using the Nunjucks template, it will escape properly!

https://mozilla.github.io/nunjucks/templating.html#autoescaping

What template language are you using?

@RichardJECooke
Copy link
Author

What template language are you using?

Nunjucks. I googled and saw you have to add | escape to the feed.njk file in your documentation to get it to work. That should be added I think, took me a while to find.

(I also had to change posts to post, because no one tags a post as plural)

@zachleat
Copy link
Member

Yeah, sorry. Nunjucks has an autoescape feature on by default so you shouldn’t need to use the escape filter. https://mozilla.github.io/nunjucks/templating.html#autoescaping

Does your project disable the autoescape? That might explain it better

@zachleat
Copy link
Member

zachleat commented Jun 8, 2024

This is an automated message to let you know that a helpful response was posted to your issue and for the health of the repository issue tracker the issue will be closed. This is to help alleviate issues hanging open waiting for a response from the original poster.

If the response works to solve your problem—great! But if you’re still having problems, do not let the issue’s closing deter you if you have additional questions! Post another comment and we will reopen the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
education open-question Further information is requested from the original poster.
Projects
None yet
Development

No branches or pull requests

2 participants