FYI: Facebook is breaking shared links

10 points by colinsidoti ↗ HN
If you share a link on Facebook with a query string, Facebook automatically strips the equals sign out of any empty parameters. IE:

'ship_id=19&region_id=&duration=&embark_id=15&debark_id=&depart_start=&depart_end='

Becomes: 'ship_id=19&region_id&duration&embark_id=15&debark_id&depart_start&depart_end'

I think this is effectively altering standard browser behavior.

This also breaks my rails app, which is unfortunate. Looking for a solution on that front, but thought I should make people aware of this asap.

3 comments

[ 3.6 ms ] story [ 14.2 ms ] thread
Fixing my app was easy. I was checking for empty? but now I'm checking for nil? or empty?

I still think it's weird Facebook would do this.

You are surprised? Really? :) With Facebook???

I'm surprised they don't change the URL to point to purchasing credits for farmville :)

For what it's worth, `#blank?` is equivalent to `s.nil? or s.empty?` in Rails.