Press This 404 errors caused by move to Hostgator

No disrespect to HostGator – I love them! But after moving my hosting to HostGator my “Press This” bookmarklet JavaScript no longer worked. Here is the very easy fix.

The problem:

Some hosts have lame mod_security rules that block unencoded urls, making Press This unusable.

Source:  http://forums.hostgator.com/apache-upgrade-broke-feature-wordpress-t40603.html

The fix:

Replace:

u='+e(l.href)+'

With:

u='+e(l.href.replace(/\//g,'\\/'))+'

Source:  http://wordpress.org/support/topic/press-this-results-in-404?replies=22#post-1008326

#16940 (Prevent 403 errors in Press This) – WordPress Trac