remove escapeAndEncode, replace with encodeURIComponent

The encoding now has the same behavior as it did in 0.2.9