Price match guarantee with a bug @Hotels.com

I just came across this website ( Hotels.com), so went ahead and started playing around the website. I really liked the interface, though a little cluttered homepage, it gave a complete overview of the offers on the website. I saw the " Price Match Guarantee", so went ahead to check their rates for the hotel I stayed in Puducherry (Ginger Hotel). I was shocked to see the results for Jayaram Hotel which was Rs....

September 18, 2010 · 1 min

Facebook: Bug with URL encoding

Today, while I was working on the URL encoding for the recently released Facebook-style Links module, I realized a bug with Link Attachments feature on Facebook. Before I explain, let us reproduce it: Try to attach the following link on Facebook: http://google.com/search?q=blenders%26pride. This URL actually queries Google for ‘blenders&pride’. Facebook converts/encodes the above URL to http://google.com/search?q=blenders&pride which is not the same as above and queries Google for just ‘blenders’. So, why Facebook does this? Probably Facebook tries to encode the URL to remove the characters which are not allowed by RFC 3986 and replaces them with their percent encoding. But there are certain characters which should not be encoded, such as ‘/’, ‘?’, ‘#’, ‘@’ which are the reserved characters and used as delimiters in the URL. So, it decodes these characters and converts their encoding to the original character which gives rise to the problem. Let us see an example:

March 12, 2010 · 2 min