Skip to content

v3.1.0

Latest

Choose a tag to compare

@markpritchard markpritchard released this 26 Nov 09:45
· 1 commit to master since this release

3.1.0

What is it about .0 releases?

Despite lots of testing, the world of RSS+Atom never ceases to amaze me, and .0 had quite a few regressions. Thank you to all the existing and new contributors, your help is greatly appreciated. Detailed bug reports, simple reproducers, references to broken feeds - these are all very useful.

I'd also like to thank all of you who also maintain open source projects. Your work is appreciated and I hope your communities demonstrate this through respect, patience and courtesy. And PRs 😄

Bug fixes

  • Fix panic in parse_person_name_email on multi-byte characters next to email address.
    Extends the delimiters to include Unicode variants of delimiters such as full-width left and right paranthesis and replaces the regex + slicing with a simpler version that is more robust.
    Thanks for the great bug report @justin-stanley !

  • Extend missing RSS version to missing attribute
    Handles not just an empty version attribute, but an entirely missing one too.
    Thanks for the bug report @andmetoo !

  • Allow an empty media description
    Allows an empty media:description and media:title elements per Youtube feeds
    Thanks for the report and fix @kevincox !

  • Limit xml:base to 1024 characters
    A long xml:base with a large feed can cause memory pressure and extended parse times due to it being copied into every relative link. This is now capped.
    Thanks for the bug report @Develata !

  • JSON Feed item image and banner_image are not parsed
    JsonFeed supports the 'image' and 'banner_image' fields. These are now mapped to a MediaObject with source of MediaObjectSource::JsonFeed and attached to the corresponding entry.
    Thanks for the bug report @andmetoo !

  • Emit MediaObject when an entry only has thumbnails
    It is common for a feed to just include a thumbnail (BBC News, GitHub releases) so this commit fixes the regression by once again emitting a MediaObject for entries with just thumbnails.
    Thanks for the bug report @andmetoo !

  • Accept a numeric item id in JSON Feed
    The JSON feed specification indicates a reader should coerce a numeric ID to a string.
    Thanks for the bug report and fix @jayhemnani9910 !

  • Retain valid published and updated fields in RSS2
    A valid 'pubDate' or 'updated' field could be overwritten by invalid data from DublinCore etc.
    The RSS2 parser will now retain a valid date if present.

  • Keep the RSS enclosure when media:content lists other files
    An item's <enclosure> was dropped when the item also has a <media:content> for another file. This is common in WordPress podcast feeds.
    Thanks for finding this and implementing the fix @jayhemnani9910 !

  • Improve content handling across basic fields
    3.0.0 introduced a regression where unescaped markup would truncate the content for that element.
    While this is technically consistent with various specifications, it is not how feeds are constructed in the real world, e.g. a <title> field may have unescaped or literal markup in the string, rather than its escaped form.
    Content is now coerced into the expected format. For a field that expects literal markup, escaped content will be decoded automatically.
    Thanks for the amazing bug report @justin-stanley !

Improvements

  • Audit code and address sources of panic

    • parse_npt clamps units to valid ranges (e.g. 0..59 for minutes of an hour) before assembling the Duration
    • The Debug trait of Feed could panic when serialising to JSON, now it just writes a well-formed error
    • Unicode-digit panic in NPT time parsing. The npt related regexes used \d which matches Unicode digits (such as Arabic-Indic ٣), but the parser only expected ASCII digits.
    • Improve re-usability of a parser instance between error states. A failure in parsing media objects could poison the state maintained in parser. This commit resets that state between entries and adds a test to ensure this continues to work in the future.
    • Cap recursion when parsing media elements. The RSS media spec allows nested elements (such as group). This commit caps the level of recursion to avoid a stack overflow.
  • Read dc:date and atom:updated on RSS 2.0 channel
    The item parser handles these, and the channel parser will now read these too.
    Thanks for raising the issue and providing a fix @youdie006 !

  • Use jiff instead of chrono
    The chrono crate is no longer maintained.
    Thanks for fixing this @sanpii !

  • Test with all features enabled
    The CI matrix build did not test the sanitize feature.