rust-syndication / rss

Library for serializing the RSS web content syndication format
https://crates.io/crates/rss
Apache License 2.0
416 stars 51 forks source link

Encode & and < with hex codes #99

Open jo-so opened 4 years ago

jo-so commented 4 years ago

The feed validator suggests to encode & and < with &#26; and &#x3C; for compatibility reasons:

A publisher should encode "&" and "<" in plain text using hexadecimal character references. When encoding the ">" character, a publisher should use the hexadecimal reference >.

The following input gave me the suggestion:

<rss version="2.0"><channel><title>TEST</title><link>https://example.org/</link><description>Test</description><language>de-de</language><copyright>© 2020 Jon Doe &lt;me@example.org&gt;</copyright></channel></rss>
andy128k commented 4 years ago

Recommendation looks dated (late 2007). It is based on tests in different RSS clients. Let's look at this list.

  1. Apple Safari -- RSS removed around 2017;
  2. Bloglines -- became unavailable in early 2015;
  3. Mozilla Firefox -- RSS removed around late 2018;
  4. Internet Explorer -- probably it was IE 7 while current is 11;
  5. Opera -- switched to Chromium engine in 2013;
  6. FeedDemon -- terminated in 2013;
  7. Google Reader -- terminated in 2013;