Closed aintgoin2goa closed 7 years ago
@aintgoin2goa maybe this is what you're looking for ?
{
title: 'some title',
custom_elements: [
{
"content:encoded": {
_cdata: "your contents here"
}
}
]
}
and it'll generate this xml
...
<item>
<title><![CDATA[some title]]></title>
<content:encoded>
<![CDATA[
your contents here
]]>
</content:encoded>
</item>
...
hope that helps you out, cheers
actually, a good example here #36
Thanks for replying. When I tried to do this it seemed to encode the html I passed to it (like >p<
instead of <p>
but maybe I missed something? I will try using the example you gave, thanks for your help 👍
I was hoping to use this module to create a feed which includes HTML content. The module consuming this feed expects to find the full content inside a
<content:encoded>
tag. This seems to be in line with the spec but node-rss doesn't seem to support this and when I attempt to use custom elements it encodes the html.Could you please consider adding support for
<content:encoded>
- maybe a new option toitem()
?