Kaydet (Commit) 16ef8eb7 authored tarafından ğ's avatar ğ

url encode for spesific chars

üst c8812d49
...@@ -25,7 +25,6 @@ import gettext ...@@ -25,7 +25,6 @@ import gettext
__trans = gettext.translation('inary', fallback=True) __trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext _ = __trans.gettext
############################# #############################
# Path Processing Functions # # Path Processing Functions #
############################# #############################
...@@ -98,8 +97,9 @@ def url_encode(url): ...@@ -98,8 +97,9 @@ def url_encode(url):
head = url.split("?")[0] head = url.split("?")[0]
get = url.split("?")[1] get = url.split("?")[1]
getx = "?" getx = "?"
chars = ["+"]
for i in get: for i in get:
if not i.isalnum(): if i in chars:
getx += "%"+str(hex(ord(i))).split("x")[1] getx += "%"+str(hex(ord(i))).split("x")[1]
else: else:
getx += i getx += i
......
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