diff --git a/searx/static/themes/courgette/js/searx.js b/searx/static/themes/courgette/js/searx.js index 47dc722da..92a25e349 100644 --- a/searx/static/themes/courgette/js/searx.js +++ b/searx/static/themes/courgette/js/searx.js @@ -1,6 +1,6 @@ if(searx.autocompleter) { window.addEvent('domready', function() { - new Autocompleter.Request.JSON('q', '/autocompleter', { + new Autocompleter.Request.JSON('q', './autocompleter', { postVar:'q', postData:{ 'format': 'json' diff --git a/searx/static/themes/default/js/searx.js b/searx/static/themes/default/js/searx.js index 9be969bb3..d6d5b74bb 100644 --- a/searx/static/themes/default/js/searx.js +++ b/searx/static/themes/default/js/searx.js @@ -1,6 +1,6 @@ if(searx.autocompleter) { window.addEvent('domready', function() { - new Autocompleter.Request.JSON('q', '/autocompleter', { + new Autocompleter.Request.JSON('q', './autocompleter', { postVar:'q', postData:{ 'format': 'json' diff --git a/searx/static/themes/oscar/js/searx.min.js b/searx/static/themes/oscar/js/searx.min.js index 2015c4d6a..8a1055da3 100644 Binary files a/searx/static/themes/oscar/js/searx.min.js and b/searx/static/themes/oscar/js/searx.min.js differ diff --git a/searx/static/themes/oscar/js/searx_src/autocompleter.js b/searx/static/themes/oscar/js/searx_src/autocompleter.js index 561bff35a..70c66d2fc 100644 --- a/searx/static/themes/oscar/js/searx_src/autocompleter.js +++ b/searx/static/themes/oscar/js/searx_src/autocompleter.js @@ -19,7 +19,7 @@ if(searx.autocompleter) { searx.searchResults = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, - remote: '/autocompleter?q=%QUERY' + remote: './autocompleter?q=%QUERY' }); searx.searchResults.initialize(); } diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index df5c53965..c185f8774 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -46,7 +46,7 @@
{% include 'oscar/navbar.html' %} - + {% block site_alert_error %} {% endblock %} {% block site_alert_warning %} @@ -62,7 +62,7 @@ {% endblock %} {% block site_alert_success %} {% endblock %} - + {% block content %} {% endblock %} diff --git a/searx/webapp.py b/searx/webapp.py index b12a08db5..13c965e0d 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -81,6 +81,8 @@ app = Flask( template_folder=templates_path ) +app.jinja_env.trim_blocks = True +app.jinja_env.lstrip_blocks = True app.secret_key = settings['server']['secret_key'] babel = Babel(app)