Problem with RSS - XMLEscape

Hi. I’m running Hugo v0.120.4.

I am trying to edit the rss.xml file to deploy full content in my rss feed.

The first step I took was to create the rss.xml file in my _default folder and copy over the built-in RSS template from the zip/github.

But when I deploy Hugo with that unedited rss.xml file, I’m getting the following errors (with the same choke point on line 67):

ERROR render of "section" failed:
Error: error building site: render: failed to render pages: render of "home" failed:

execute of template failed: template: _default/rss.xml:67:33: executing "_default/rss.xml" at <transform>: can't evaluate field XMLEscape in type interface {}

When I deploy Hugo without the copied/pasted rss.xml file in _default, Hugo builds normally without the error. But I only get summaries of the content, whereas I want full text RSS.

Any insight?

1 Like

https://gohugo.io/functions/transform/xmlescape/

Added in v0.121.0 – you’re running an earlier version

2 Likes
<description>{{ .Content | transform.XMLEscape | safeHTML }}</description>
2 Likes

Doh!

I just upgraded Hugo again and full text seems to be working with .Content.

I’m going to test the new RSS feed and see if html formatting carries over to RSS feeds…

Thank you!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.