-
Notifications
You must be signed in to change notification settings - Fork 131
CDATA filtering options, new item addition functions, unit tests #37
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
Conversation
…concat_items and replace_items. Associated unit tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example of specifying a field for no CDATA wrapping
|
Might I suggest the option be named something other than |
|
Seems like a good suggestion. The So, depending on the |
@rv-kip I must have misunderstood, then. If the elements are going to be encoded regardless whether they're in a CDATA block or not, then the |
|
In my use-case, some consumers of the generated XML/RSS will display the "CDATA" tags as if they were part of the content. This is a due to the heterogeneity of our XML clients. Being able to suppress the CDATA tags and escape the data for particular fields turns them into text fields that will display properly. |
|
As long as it's clear that this change (or a portion thereof) is to support Personally, I wouldn't accept any code meant solely to satisfy non An alternative would be to wrap node-rss in a custom adapter object. This my 2 cents On Tue, Dec 16, 2014 at 2:24 PM, Kip Gebhardt [email protected]
|
|
Yep. It clearly isn't ideal that some clients behave incorrectly, but the XML landscape isn't a perfect one. Perhaps |
|
Yeah, if the result will be encoded either way, better that the option be On Tue, Dec 16, 2014 at 2:38 PM, Kip Gebhardt [email protected]
|
…. Adding test for XML escaping when no_cdata_fields is used
… by item() resulting in inconsistencies like missing category field. Added test for this issue
|
I found a couple of typos and a bug while developing against this PR. I'll stop adding to it now ;) |
|
Hi @rv-kip. I feel like a jerk because I touched a lot of the code while your PR was in flight and this might be a painful merge. Do you want to try pull in the latest from master? Or split it into smaller PR's? |
readme.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The readme file is generated.
grunt pre-publish to re-generate it.
The files it uses are in /templates/readme.
|
No problem. I'll resubmit a PR from latest master. This can be closed. |
…ply-for-new-pr Conflicts: lib/index.js test/rss.test.js
This is similar to existing PR #28, but allows for finer control over what fields can be skipped for CDATA wrapping.