How to Nuke Your RSS Feed
Tags: java, wordpress, writing
Published: 2019-11-14 15:12:59

If you’ve been subscribed to my newsletter for a little while, you may have noticed a few weeks where I wasn’t sending an emails. As it turns out, I managed nuke my RSS feed, and you can too with this **one simple trick**.

## Backstory

In case you’re not a regular subscriber, here’s the situation. Every Friday at noon, I send an automated email to all of my subscribers using MailChimp. For simplicity, that email is generated using [my RSS feed](https://therenegadecoder.com/feed/). Specifically, each week an email is created from the two posts from the previous week.

Well, at some point, my regular weekly email went dark:

![MailChimp Blog Updates Log](https://i2.wp.com/therenegadecoder.com/wp-content/uploads/2019/08/mailchimp-blog-updates-log.png?fit=800%2C384&ssl=1)

As you can see, I sent an email out on August 9th, then I didn’t send another one out until I corrected the issue on August 24th. In other words, there were two weeks of missed emails.

At one point, I was at out of the house when I got an email saying that I had a new subscriber. Suddenly, I realized that I hadn’t gotten one of my own emails in awhile, so I decided to investigate. Yup, my automated email has been dead for some time.

## Investigation

When I went home, I decided to hop on my MailChimp account to see if I could find any issues. Since I didn’t have any notifications, I thought it might be a good idea to do what IT usually does: turn my automated email off and on. Unfortunately, I couldn’t turn the email back on.

According to MailChimp, I didn’t have a proper RSS feed. In the past, one of my plugins messed up my feed, so I was thinking maybe that was the issue. Of course, I didn’t trust MailChimp, so I grabbed my RSS feed and dropped it into [an RSS validator](https://validator.w3.org/feed/).

When I did that, I found that MailChimp was actually telling the truth. Apparently, there was some part of my feed which wasn’t properly formed. Fortunately, the validator was able to give me the exact line. When I investigated further, I realized it was an issue with a singular character in [one of my articles](https://therenegadecoder.com/code/the-8-primitive-types-in-java/).

If you follow that link, you’ll be taken to a pretty innocuous article. In general, the premise of the article is to share some details about the different primitive types in Java. Of course, with each primitive type, I decided to share their range. That’s when I ran into a problem.

## One Tip to Nuke Your RSS Feed

If you’re familiar with Java, then you’re probably aware that characters aren’t 8-bit. Instead, they’re 16-bit which means their range extends from 0 to 65,535. Of course, **not all of those characters are valid**.

For example, in my article on the primitive types, I decided to demonstrate the range of characters with the following command:

```java
Character.MIN_VALUE // Prints the character at index 0
Character.MAX_VALUE // Prints the character at index 65,535
```

Of course, when I wrote the article, I actually showed the character:

![Bad RSS Character](https://i1.wp.com/therenegadecoder.com/wp-content/uploads/2019/08/bad-rss-character.png?w=800&ssl=1)

When I pasted that box character into an article, WordPress never really complained. In fact, it rendered exactly like that in the article, and I didn’t really notice any issues.

Unfortunately, two weeks went by before I realized the effects on my RSS feed. After I patched the issue, I turned around and pushed out an email that night.

## Moral of the Story

As it turns out, there are certain characters that are deemed invalid in RSS. Unfortunately, I wasn’t able to find any documentation on this issue beyond a few low quality posts on forums.

If I had to guess, there is a list of illegal characters in the XML specification. As a result, the RSS specification inherits those illegal characters and may even add to it. If anyone knows more about this sort of issue, let me know.

At any rate, after this happened, I told one of my friends—[Robert](https://therenegadecoder.com/blog/lets-meet-virtualflat/)—about it, and he thought it was hilarious. Ever since, he’s been dumping that box character into all sorts of interfaces including Discord and iMessage. So far, we haven’t seen any issues. However, it does render differently depending on the platform.

After chatting, we remembered there used to be a funny character related bug in chrome which would crash the browser. In fact, a lot of people were making funny games where you would have to avoid touching buttons that would load the character. If you’re interested in that sort of thing, I found [an article from 2015 that details the whole saga](https://venturebeat.com/2015/09/18/these-16-characters-crash-google-chrome/).

## Help Grow The Renegade Coder

Well, that’s enough fun for one day. If you like this sort of content, I don’t mind sharing information about bugs I run into. Hell, that might actually be a fun new series.

Regardless, thanks again for your support. If you’d like to show a little extra, [head on over to Patreon](https://www.patreon.com/TheRenegadeCoder) where you can toss me a couple bucks for my efforts. Also, you’re welcome to join [the mailing list](https://newsletter.therenegadecoder.com) where you’ll receive one email a week. 

While you’re here, I have a ton more content where this came from:

- [How to Spot a Bad Mentor](https://therenegadecoder.com/blog/how-to-spot-a-bad-mentor/) (Premium)
- [How I Almost Built a Twitter Bot](https://therenegadecoder.com/blog/how-i-almost-built-a-twitter-bot/)
- [How to Clean Your WordPress Database](https://therenegadecoder.com/blog/how-to-clean-your-wordpress-database/)

As always, thanks for stopping by!

The post [How to Nuke Your RSS Feed](https://therenegadecoder.com/blog/how-to-nuke-your-rss-feed/) appeared first on [The Renegade Coder](https://therenegadecoder.com).