reddit/reddit — pull request #490 by grischard (2012-08-12 23:24:38+00:00)
Title: Correctly escape special characters in RSS feed URLs

As discussed on IRC. Some RSS clients (e.g. NetNewsWire) choke on special characters in URLs.

The problem I'm fixing can be demonstrated by running ` curl http://www.reddit.com/r/stereotest/.rss | grep -o -E http://.+?müllers '. The URLs should contain m%C3%BCllers instead of müllers.

This patch tells quote_plus to urlencode the url strings' special characters to their UTF8 code, unless they are the safe characters ':' or '/'.