Yoast / developer

The Yoast Developer portal based on Docusaurus
6 stars 15 forks source link

Yoast SEO RSS feeds broken due to corrupted changelogs #300

Closed jeremyredhead closed 5 months ago

jeremyredhead commented 5 months ago

The problem

The files changelogs/wordpress-seo.md and changelog/wordpress-seo-premium.md contain ASCII control characters. Specifically they contain the \x07 (BEL) and \x1B (ESC) characters, respectively. Considering the context, this is most likely a result of the unintended translation of the escape sequences \a and \e.

This results in the Yoast SEO RSS feed and the Yoast SEO Premium RSS feed being invalid XML, which prevents their proper viewing in at least Chrome & Firefox, and prevents at least Thunderbird from adding it as a feed.

This also makes the few changelogs affected more difficult to understand.

The solution

Replace the ASCII control characters with a backslash and an 'a' or 'e', of course. The problem is that it appears that whatever system or program may have been case insensitive (i am not 100% sure), and either way I am not familiar enough with the obscurer corners of Yoast to feel confident making a PR. That said, I'm pretty sure all instances of \x07 in changelogs/wordpress-seo.md should be replaced with \<!---->a, and SEO<!---->\x1B<!---->nable_notification_ with SEO<!---->\<!---->enable_notification_. However, I am unsure if Third_Party<!---->\x1B<!---->lementor_Premium should be replaced with Third_Party<!---->\<!---->Elementor_Premium or Third_Party<!---->\<!---->elementor_Premium. Usually these escape sequences are only implemented for the lowercase variants of their letters, but the context of the text implies that the class would be capitalized.

Additionally, it looks like \<!---->r got translated into \x0D (CR), which then got eaten or replaced with \x0A (LF), probably by git? Either way, Yoast\WP\SEO<!---->\x0A<!---->edirects_options_autoload should definitely be replaced with Yoast\WP\SEO<!---->\<!---->redirects_options_autoload since that's clearly what was intended.