Only sanitize result content on main result page

The other result tabs (images/maps/videos/news) don't have text content
that needs sanitizing.

Fixes #1080
main
Ben Busby 2023-10-11 11:08:25 -06:00
parent 67b6110087
commit 330ae964f3
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 5 additions and 2 deletions

View File

@ -161,6 +161,9 @@ class Filter:
self.update_styling() self.update_styling()
self.remove_block_tabs() self.remove_block_tabs()
# self.main_divs is only populated for the main page of search results
# (i.e. not images/news/etc).
if self.main_divs:
for div in self.main_divs: for div in self.main_divs:
self.sanitize_div(div) self.sanitize_div(div)