-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Character encoding bugs in RSS feed #2313
Comments
I'll take this one. |
In When I look up the documentation for the Let me do some digging to see if there is a builtin utility function to just escape the |
We've replaced underscore with lodash, although the That's just a wrapper for |
I should've noticed it was lodash 😄 and not underscore. So it's easy enough to write a custom function to do this (based on lo-dash's approach which looks almost identical to underscores approach).
Trying to figure out a good place to put this function. |
I believe that this is actually a double encoding issue. It seems that I think we need to remove the |
If we remove the Just as a note... it seems using CDATA for RSS feeds is not standard. Not necessarily bad, but not standard. Most RSS feeds seem to use no CDATA sections and standard xml encoding practice( encode &, <, and > for data in an xml element). |
I think that #2263 is likely to turn up a lot of oddness with RSS - which we can report to node-rss, but perhaps looking for a different solution will be in order. |
I'm very positive on replacing node-rss. One of the app ideas is to add additional fields to the RSS (e.g. for Podcasts), but node-rss only allows a predefined set of fields. The project doesn't seem to be very active from what I see in https://github.com/dylang/node-rss/issues. There was someone two years ago trying to allow custom fields (dylang/node-rss#6), but that never landed. |
@knunery Any chance we can get an updated PR to fix the problem as described? I realise this is symptomatic of a larger issue, but we can deal with that separately. Would like to get this in 😺 |
I made a pull request that only removes the lodash |
I just read up on the issue: _.escape shouldn't be used at all. The title seems to be properly escaped but it should then not be wrapped in a CDATA. Was anyone able to figure out where the CDATA comes from? @knunery: I'm sorry I'm that picky but: |
@halfdan The CDATA is output by node-rss https://github.com/dylang/node-rss/blob/master/lib/rss.js#L67. |
The text was updated successfully, but these errors were encountered: