Pass response as str to bsoup for "my ip" card

Due to how the response is now reformed into a new bsoup object when
bolding search query terms, creating an ip card for "my ip" searches
threw an error due to how the new bsoup object was initialized for the
"my ip" card. This passes the response in as a string instead.

Fixes #504
このコミットが含まれているのは:
Ben Busby 2021-10-28 21:21:21 -06:00
コミット 26b560da1d
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 339B7B7EB5333D14

ファイルの表示

@ -253,9 +253,10 @@ def search():
# Return 503 if temporarily blocked by captcha
resp_code = 503 if has_captcha(str(response)) else 200
response = bold_search_terms(response, query)
# Feature to display IP address
if search_util.check_kw_ip():
html_soup = bsoup(response, "html.parser")
html_soup = bsoup(str(response), 'html.parser')
response = add_ip_card(html_soup, request.remote_addr)
return render_template(