omz13 / kirby3-feeds

A plugin for kirby3 to generate rss, atom, and json syndication feeds
21 stars 3 forks source link

Kirbytext in copyright field not parsed #3

Open fabianmichael opened 5 years ago

fabianmichael commented 5 years ago

The feeds plugin automatically adds a <copyright> and <dc:rights> tag to the generated feeds by using the $site’s copyright field. Many of us use this field to automatically update the year next to it by using the (date: year) KirbyTag. However, as the feeds plugin does not process the field’s value as Kirbytext, the raw KirbyTags will be inserted into the feed’s output.

Please consider to treat that field’s value as Kirbytext and stripping the tags to keep the output XML-compatible:

strip_tags(kirby()->site()->content()->get( 'copyright' )->kirbytext())
omz13 commented 5 years ago

@fabianmichael Good catch; will fix.