Commit 41ad090e authored by xu.jimmy.wrk's avatar xu.jimmy.wrk

don't need to decode here

parent febfb972
......@@ -43,11 +43,6 @@ expect = {IP: 28, TLS: 35, URL: 56, INVALID: 0}
def getUrl(rule):
global offset
rule = unquote(rule.encode())
try:
rule = rule.decode('utf-8', 'strict')
except UnicodeDecodeError:
rule = rule.decode('gbk', 'ignore')
if rule.startswith('||'): return ('http://' + rule[2:], IP)
if rule.startswith('|https'): return (rule[1:], TLS)
if rule.startswith('|http://'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment