Sublime Forum

URI encode?

#1

is there plugin or hacks to URI encoding ?

from: бесплатные to %E1%E5%F1%EF%EB%E0%F2%ED%FB%E5

0 Likes

#2

http://bitbucket.org/wuub/miscst2plugins

# encoding: utf-8
import sublime_plugin
class UrlQuoteSelection(sublime_plugin.TextCommand):
    def run(self, edit):
        from urllib import quote_plus
        for selection in reversed(self.view.sel()):
            self.view.replace(edit, selection, quote_plus(self.view.substr(selection).encode("utf-8")))
0 Likes

#3

There is a snippet for base64_encode/decode? :mrgreen:

0 Likes

#4

ghmm
how to hard ;(

0 Likes