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.
pull/731/head
Ben Busby 2 years ago
parent 5c8be4428b
commit a9b675cd24
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1

@ -93,12 +93,13 @@ class Filter:
self.config = config
self.mobile = mobile
self.user_key = user_key
self.root_url = root_url
self.page_url = page_url
self.main_divs = ResultSet('')
self._elements = 0
self._av = set()
self.root_url = root_url[:-1] if root_url.endswith('/') else root_url
def __getitem__(self, name):
return getattr(self, name)

Loading…
Cancel
Save