Skip to content

Commit

Permalink
Support ST2
Browse files Browse the repository at this point in the history
* format Menu Entries and Commands
* del package.json
  • Loading branch information
Medicean committed Aug 20, 2016
1 parent 81e9aa1 commit f2778a6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Default.sublime-commands
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@
{
"caption": "XssEncode: UnicodeEncode",
"command": "unicode_encode"
},
}
]
2 changes: 1 addition & 1 deletion Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{"id": "unicode_encode", "caption": "UnicodeEncode", "command": "unicode_encode"},
{"id": "unicode_decode", "caption": "UnicodeDecode", "command": "unicode_decode"},
{"caption": "-"},
{"id": "md5_encode", "caption": "MD5_Encode", "command": "md5_encode"},
{"id": "md5_encode", "caption": "MD5_Encode", "command": "md5_encode"}
]
}]
}]
16 changes: 0 additions & 16 deletions package.json

This file was deleted.

6 changes: 3 additions & 3 deletions xssencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def convert(self, source_txt):
import base64
except:
return source_txt
return base64.b64encode(source_txt.encode(encoding="utf-8")).decode()
return base64.b64encode(source_txt.encode("utf-8")).decode()


class Base64DecodeCommand(XssEncodeCommand):
Expand All @@ -48,7 +48,7 @@ def convert(self, source_txt):
import base64
except:
return source_txt
return base64.b64decode(source_txt).decode()
return base64.b64decode(source_txt).decode('utf-8')


class UrlEncodeCommand(XssEncodeCommand):
Expand All @@ -75,7 +75,7 @@ def convert(self, source_txt):
import hashlib
except:
return source_txt
return hashlib.md5(source_txt.encode(encoding="utf-8")).hexdigest()
return hashlib.md5(source_txt.encode("utf-8")).hexdigest()


class Html10EncodeCommand(XssEncodeCommand):
Expand Down

0 comments on commit f2778a6

Please sign in to comment.