aboutsummaryrefslogtreecommitdiff
path: root/src/utils/http.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-19 13:51:27 +0100
committerGravatar jesopo2019-09-19 13:51:27 +0100
commitb69c9146b217f55e8cc627a739c644a99ec8cb87 (patch)
treec71805a95865632096accf97e40383a1cd5a9289 /src/utils/http.py
parentappend "CVE-" to CVE ids without it (diff)
signature
should be using pair_start/pair_end throughout `for`
Diffstat (limited to 'src/utils/http.py')
-rw-r--r--src/utils/http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/http.py b/src/utils/http.py
index 4896866e..eed1c0fb 100644
--- a/src/utils/http.py
+++ b/src/utils/http.py
@@ -21,8 +21,8 @@ def url_sanitise(url: str):
# google.com/()) -> google.com/()
if url.endswith(pair_end):
if pair_start in url:
- open_index = url.rfind("(")
- other_index = url.rfind(")", 0, len(url)-1)
+ open_index = url.rfind(pair_start)
+ other_index = url.rfind(pair_end, 0, len(url)-1)
if not other_index == -1 and other_index < open_index:
url = url[:-1]
else: