Strip trailing slash on root url in filter
If a trailing slash is defined here, it causes the Whoogle instance to redirect these element requests back to the home page, causing unwanted behavior.main
parent
5c8be4428b
commit
a9b675cd24
|
@ -93,12 +93,13 @@ class Filter:
|
||||||
self.config = config
|
self.config = config
|
||||||
self.mobile = mobile
|
self.mobile = mobile
|
||||||
self.user_key = user_key
|
self.user_key = user_key
|
||||||
self.root_url = root_url
|
|
||||||
self.page_url = page_url
|
self.page_url = page_url
|
||||||
self.main_divs = ResultSet('')
|
self.main_divs = ResultSet('')
|
||||||
self._elements = 0
|
self._elements = 0
|
||||||
self._av = set()
|
self._av = set()
|
||||||
|
|
||||||
|
self.root_url = root_url[:-1] if root_url.endswith('/') else root_url
|
||||||
|
|
||||||
def __getitem__(self, name):
|
def __getitem__(self, name):
|
||||||
return getattr(self, name)
|
return getattr(self, name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue