Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
修正Url编码解码空格问题
Browse files Browse the repository at this point in the history
  • Loading branch information
handbye committed Jul 20, 2020
1 parent a899b9a commit 36b1fce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DEcoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,20 @@ def base_select_decode():
# 右侧输入输出框
url_output = tk.Text(window, height=6, width=40)
url_output.place(x=500, y=190, anchor='nw')
url_output.insert('end', '请去除转换后字符串末尾的最后一个%OA')


def url_all_encode():
result = url_input.get("0.0", "end") # 从0行0列获取输入值直到结束
result = quote(result)
url_output.delete("0.0", "end") # 每次输出结果前先清空文本框内的内容
url_output.insert('end', result.rstrip())
url_output.insert('end', result.rstrip()[:-3])


def url_key_encode():
result = url_input.get("0.0", "end") # 从0行0列获取输入值直到结束
result = requote_uri(result)
url_output.delete("0.0", "end") # 每次输出结果前先清空文本框内的内容
url_output.insert('end', result.strip())
url_output.insert('end', result.strip()[:-3])


def url_decode():
Expand Down

0 comments on commit 36b1fce

Please sign in to comment.