From a00ccb1da84216b53667fe8e946c97c6e09252f7 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 8 Apr 2020 18:11:08 +0000 Subject: [PATCH] Small fix for viewing images on mobile, updated document title formatting --- app/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routes.py b/app/routes.py index c7aaea7..136d6c9 100644 --- a/app/routes.py +++ b/app/routes.py @@ -116,7 +116,7 @@ def search(): # Update logo logo = soup.find('a', {'class': 'l'}) - if logo is not None and 'Android' in user_agent or 'iPhone' in user_agent: + if logo is not None and ('Android' in user_agent or 'iPhone' in user_agent): logo.insert(0, 'Shoogle') logo['style'] = 'display: flex;justify-content: center;align-items: center;color: #685e79;font-size: 18px;' @@ -149,7 +149,7 @@ def search(): except Exception: pass - return render_template('display.html', query=q, response=soup) + return render_template('display.html', query=urlparse.unquote(q), response=soup) @app.route('/config', methods=['POST'])