Check max URL length before URL encoding, instead of after. Linkscape cares only about the URL-decoded length of the string (it itself is given the decoded version). There are some very long URLs that have special characters that, when URL encoding to pass to linkscape, surpass the 500 character limit, but linkscape accepts them because the unecndoded version is less than 500 characters.
Check max URL length before URL encoding, instead of after.
Linkscape cares only about the URL-decoded length of the string (it itself is given the decoded version). There are some very long URLs that have special characters that, when URL encoding to pass to linkscape, surpass the 500 character limit, but linkscape accepts them because the unecndoded version is less than 500 characters.

seomoz/linkscape-gem