This package that takes care of your encoding (escaping) needs: url, base64, html and soon: json, js, sql, xml, sgml
It support multi line selection, and it is well unit tested.
shift-cmd-e shift-cmd-u
to URL encode selected text.shift-cmd-e cmd-u
to URL decode selected text.shift-cmd-e shift-cmd-b
to encode selected text using Base64.shift-cmd-e cmd-b
to decode selected text using Base64.shift-cmd-e shift-cmd-h
to escape HTML entites.shift-cmd-e cmd-h
to unescape HTML entities.