From 4ca0d8cb0fd6c0e6b1301a6e8577aea6d928e9dc Mon Sep 17 00:00:00 2001
From: Adam Tauber could not load data! "+could_not_load+"
"+could_not_load+"
"); }); } } diff --git a/searx/static/themes/simple/js/searx.head.min.js b/searx/static/themes/simple/js/searx.head.min.js index 00c711c793e6b8f82330c89bbd61c39c7610ad77..8cd0df3d6c23c6b44c605586daecf189227202b6 100644 GIT binary patch delta 24 fcmZo?d&W9Jir3Io*T78I$iT=zp+;e&$9^UNQ3(c+ delta 57 zcmaFH+RipXO3%Pd*T6#8$iUE2p++I2q@AQKqhpiESPFwo(G{1=v2a0>CiONK_J=I^Og?|7?TaJSO delta 1353 zcmZ`(O=}xh6h%7;QsQFLriDTwWYOpa*<(#?k=1=~MiW^Uqlq+@#!!kh5t6L=(8x1` zYzqDbDJAbGWYJY=!F1hKvrji&WR*>JA)7!ph4$VzNr-8>5%ccnx#ym%KVO!9e_8tV z#m2>(jUNUTw#A{d7WqB-oUtI3#U8~}UJFe~|eczg4$E#s?w9Ms(9 zvz~ j>zJwOfPcL z10(8|3#<&S*rkCyqSFEOIqMSzqiO%W!zNsTS(I1}ixO8b!%h@RFOr`vf2(V4Qi6-6 z#8^#|jubSltCsc7-Gf}{90T@*rOSVocT077H~FR=3=xo6a|H`1(+P)cfuy635WsFh zz0y% LHnWt4FIZuf_N2+a|KXt{o}u?8(~d zR((BYJ&cMCHUXF@866k&B_8F(oD`83*wl9IKt5buKVJ;UZKXrz;^;*R@*@ri@lip~ zJ8#%hjj>Yun8#hDSAgQwT94Qq=bY0a;PSB54xcLW?7&eI5;fz6qwohVomE#urq97_ z7I0>lN}Q@> 74qczzI2Xepa;H@<}X{nJlOEiberq$ {% block meta %}{% endblock %} - + {% block title %}{% endblock %}{{ instance_name }} {% if preferences.get_value('oscar-style') -%} diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index 650ef771c..5cb1e1757 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -12,6 +12,7 @@{% block title %}{% endblock %}{{ instance_name }} {% block meta %}{% endblock %} + {% if rtl %} {% else %} diff --git a/searx/webapp.py b/searx/webapp.py index 2ba8ccfb8..68be25584 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1021,6 +1021,14 @@ def config(): }) +@app.route('/translations.js') +def js_translations(): + return render( + 'translations.js.tpl', + override_theme='__common__', + ), {'Content-Type': 'text/javascript; charset=UTF-8'} + + @app.errorhandler(404) def page_not_found(e): return render('404.html'), 404 From 32f7877235f87f1dcfabc271e5c92539bbcdac9a Mon Sep 17 00:00:00 2001 From: Adam TauberDate: Mon, 15 Jun 2020 19:15:24 +0200 Subject: [PATCH 2/3] [fix] resolve flickr_noapi encoding issues --- searx/engines/flickr_noapi.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py index c8ee34f7a..1cbb3e0a9 100644 --- a/searx/engines/flickr_noapi.py +++ b/searx/engines/flickr_noapi.py @@ -117,14 +117,10 @@ def response(resp): 'img_format': img_format, 'template': 'images.html' } - try: - result['author'] = author - result['title'] = title - result['content'] = content - except: - result['author'] = '' - result['title'] = '' - result['content'] = '' + result['author'] = author.encode('utf-8', 'ignore').decode('utf-8') + result['source'] = source.encode('utf-8', 'ignore').decode('utf-8') + result['title'] = title.encode('utf-8', 'ignore').decode('utf-8') + result['content'] = content.encode('utf-8', 'ignore').decode('utf-8') results.append(result) return results From 0dc5bdb6ef602d00456eb1db96d45e2f42b2b7a4 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Mon, 15 Jun 2020 20:11:12 +0200 Subject: [PATCH 3/3] [fix] add missing template file --- searx/templates/__common__/translations.js.tpl | 1 + 1 file changed, 1 insertion(+) create mode 100644 searx/templates/__common__/translations.js.tpl diff --git a/searx/templates/__common__/translations.js.tpl b/searx/templates/__common__/translations.js.tpl new file mode 100644 index 000000000..8453aba69 --- /dev/null +++ b/searx/templates/__common__/translations.js.tpl @@ -0,0 +1 @@ +var could_not_load = '{{ _('could not load data') }}!';