parent
77884d05f2
commit
6696f2b12b
|
@ -63,6 +63,9 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup:
|
||||||
if len(element) == len(target_word):
|
if len(element) == len(target_word):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Ensure target word is escaped for regex
|
||||||
|
target_word = re.escape(target_word)
|
||||||
|
|
||||||
if re.match('.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
|
if re.match('.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
|
||||||
element.parent and element.parent.name == 'style'):
|
element.parent and element.parent.name == 'style'):
|
||||||
return
|
return
|
||||||
|
@ -417,7 +420,7 @@ def get_tabs_content(tabs: dict,
|
||||||
|
|
||||||
if tab_content['tbm'] is not None:
|
if tab_content['tbm'] is not None:
|
||||||
query = f"{query}&tbm={tab_content['tbm']}"
|
query = f"{query}&tbm={tab_content['tbm']}"
|
||||||
|
|
||||||
if preferences:
|
if preferences:
|
||||||
query = f"{query}&preferences={preferences}"
|
query = f"{query}&preferences={preferences}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue