afeld/magickly — pull request #19 by jcn (2013-02-27 15:37:35+00:00)
Title: Add /qe endpoint for Base64 encoding urls

Recently when I was trying to use Magickly to serve a Facebook og:image, I noticed that the request kept on failing. I finally tracked it down to the fact that when Facebook actually makes the request to fetch images from a page, it unescapes all of the entities in the URL before actually making the request, thus breaking the encoding from the /q/ syntax.

This pull request is a proposed encoding of the /q/ syntax which accepts a path-based set of options that have been encoded with Base64.urlsafe_encode.

I was trying to think about other ways of stripping the HTML entities from the URL, but this seemed like the cleanest. It also adds some URL security through security by obfuscating the URL parameters (if you're concerned about that sort of thing).