Commit Graph

282 Commits

Author SHA1 Message Date
Adam Tauber
ef2ef7974a [enh] central html escaping of results 2016-12-09 19:10:33 +01:00
Adam Tauber
971ed0abd1 [enh] add quick answer functionality with an example answerer 2016-11-19 20:53:51 +01:00
Adam Tauber
827f9e41ca [fix] gettext requires request.preferences 2016-11-15 09:56:18 +01:00
Adam Tauber
a757c2f005 [fix] remove unused imports 2016-11-14 22:15:03 +01:00
Adam Tauber
832cf37a97 [enh] display errors
also tried flask's flash feature but flask creates session cookies if it
isn't flushed. Avoiding session cookies to preserve privacy
2016-11-14 22:07:23 +01:00
Adam Tauber
94196c4b6c [enh] show traceback of search errors 2016-11-14 15:49:06 +01:00
Alexandre Flament
58a6c045c8 [mod] replace references request.request_data (GET or POST parameters) by request.form (based on merge of POST and GET parameters) 2016-11-02 14:52:22 +01:00
dalf
67e11c42b9 Clean up the architecture
Purposes :
- isolate the plugins calls
- distinction between parsing the web request and running the search (Search class). To be able to test code easily, to run searx code outside a web server, to filter the search query parameters with plugins more easily, etc...

Details :
- request.request_data contains request.form or request.args (initialize inside pre_request() function)
- Query class is renamed RawTextQuery
- SearchQuery class defines all search parameters
- get_search_query_from_webapp create a SearchQuery instance (basically the previous Search.__init__ code)
- Search class and SearchWithPlugins class takes a SearchQuery instance as class constructor parameter
- SearchWithPlugins class inherites from Search class, and run plugins
- A dedicated function search_with_plugins executes plugins to have a well define locals() (which is used by the plugins code).
- All plugins code is executed inside the try...except block (webapp.py, index function)
- advanced_search HTTP parameter value stays in webapp.py (it is only part of UI)
- multiple calls to result_container.get_ordered_results() doesn't compute the order multiple time (note : this method was call only once before)
- paging value is stored in the result_container class (compute in the extend method)
- test about engine.suspend_end_time is done during search method call (instead of __init__)
- check that the format parameter value is one of these : html, rss, json, rss (before the html value was assumed but some text formatting wasn't not done)
2016-11-02 14:22:16 +01:00
Adam Tauber
6243639f01 [mod] do not proxify images if image proxy is not set 2016-10-30 21:15:46 +01:00
Noémi Ványi
6334fca11c add version info to config endpoint 2016-10-30 15:58:34 +01:00
Adam Tauber
1b9045ed89 [enh] use morty proxy for image proxification too if it is configured 2016-10-29 23:21:07 +02:00
Adam Tauber
a67a4bf2c0 [enh] allow morty proxy without hmac key 2016-10-29 23:21:07 +02:00
Adam Tauber
574d9d40d2 Merge pull request #697 from Eig8phei/http1.1
serve pages with HTTP/1.1
2016-10-29 17:46:57 +02:00
dalf
3e7554422b [mod] the environment variable SEARX_DEBUG can override the general.debug value in settings.yml 2016-10-22 21:36:13 +02:00
Alexandre Flament
a88768efd8 Merge branch 'master' into http1.1 2016-10-22 14:25:50 +02:00
Adam Tauber
d5c0dcd18a [fix] unicode url proxiing 2016-10-17 01:32:31 +02:00
Adam Tauber
1be6e72d51 [enh] add result proxy support - #707 2016-10-17 00:23:15 +02:00
Adam Tauber
19a6ca0b68 [enh] use HMAC for image proxy url verification 2016-10-16 23:41:33 +02:00
Adam Tauber
dceb903114 [mod] disallow search results for robots 2016-10-01 20:22:52 +02:00
Eig8phei
f90eb428c6 serve pages with HTTP/1.1 2016-09-15 14:47:09 +03:00
Adam Tauber
8d4dd3c515 [fix] 404 HTTP status on not found pages - closes #681 2016-09-07 08:32:01 +02:00
Adam Tauber
fa5bc3a563 [fix] use threading to recover after incomplete request crashes - closes #651 #662 2016-09-05 22:46:25 +02:00
Adam Tauber
da4f1c2512 [mod] truncate result content in html - closes #224 2016-09-05 22:22:25 +02:00
Adam Tauber
b4b0231617 [fix] links in new tabs without js ++ noopener bug fix - closes #674 2016-09-04 15:57:43 +02:00
Noemi Vanyi
0056c4035e add custom 404 page 2016-08-24 19:53:09 +02:00
Noemi Vanyi
16a8641649 advanced-search: panel is visible when checked before 2016-07-25 23:30:48 +02:00
Noemi Vanyi
93c0c49e9a add time range search with yahoo 2016-07-25 23:19:46 +02:00
Adam Tauber
21c5fb1c45 [fix] pep8 2016-07-17 00:03:22 +02:00
Adam Tauber
5b5478bbd9 [fix] compute the order of results only once per search 2016-07-16 21:44:28 +02:00
Adam Tauber
485da54961 [mod][fix] use the average of results number ++ do not display smaller result number than the actual result count - closes #600 2016-07-16 21:44:17 +02:00
stepshal
cd9b494cb5 Fix quantity of blank lines after code object. 2016-07-10 21:44:27 +07:00
Adam Tauber
fbbb307f2e [enh] add engine shortcut to config api 2016-07-07 09:27:34 +02:00
Adam Tauber
257e52954a [enh][fix] update to latest dependencies ++ fix tests & travis test runner
WARNING: dependency changes
2016-07-04 22:46:43 +02:00
Adam Tauber
2f7752b410 [enh] display number of results 2016-06-28 00:06:50 +02:00
Noemi Vanyi
d43d9727a3 [enh] add server_settings call - closes #566 2016-06-11 00:20:09 +02:00
Adam Tauber
27218b85fa [fix] missing import 2016-06-07 21:43:24 +02:00
Adam Tauber
bd361e60d8 Revert "use ngettext for plurals" 2016-05-24 12:49:21 +02:00
Dmitry Mikhirev
6d1d8a8f8d use ngettext 2016-05-02 12:36:54 +03:00
Noemi Vanyi
adb1169fa3 add description to a var that seems to be unused 2016-04-09 19:49:59 +02:00
Noemi Vanyi
7daf98933d follow up blocked_engines renaming in templates 2016-04-09 19:49:59 +02:00
Noemi Vanyi
5867e97966 more follow ups in new preferences 2016-04-09 19:49:59 +02:00
Noemi Vanyi
8c4db08443 rename blocked engines to diabled engines 2016-04-09 19:49:59 +02:00
Noemi Vanyi
006841c4ff minor grammar fix in error message 2016-04-09 18:02:12 +02:00
Noemi Vanyi
fe691a0988 new preferences handling
Preferences class was introduced in order to handle user preferences. Right now
it parses cookies and the form in preferences. Also it can retrieve settings
based on the name of the setting.

ATTENTION
Please note that engine preferences are handled differently from now on. So it
introduces incompatible changes. Every user who has saved preferences should reset and
save his/her settings again.

This change was needed, because everytime a default disabled engine was
added saved user preferences would broke. Now engine setting tracking is
fixed.
2016-04-09 01:08:44 +02:00
Adam Tauber
fff9460238 Merge pull request #522 from jibe-b/master
add BASE engine in category "Science"
2016-03-30 11:09:22 +02:00
a01200356
94cb3a7f11 [enh] multilingual autocomplete
implemented for wikipedia, qwant and google
2016-03-29 19:10:13 -06:00
jibe-b
092e15cc1d [enh] Add BASE engine in category Science. Basic and advanced search. 2016-03-29 16:17:17 +02:00
Adam Tauber
0f518e489e [fix] csv results filename encoding 2016-03-16 10:43:28 +01:00
Adam Tauber
bc81eda64b [fix] opensearch image issue - closes #507 2016-03-02 11:52:11 +01:00
Adam Tauber
0fbd705259 [enh] settings option to change instance name - closes #450 2016-02-27 18:23:55 +01:00