Repository: searx/searx

Issue:
[flickr_noapi] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
Similar to #419

Installation: current master commit
How to reproduce? Search for "kek" on https://search.snopyta.org/ and click on "Images"

```
ERROR:flask.app:Exception on / [POST]
Traceback (most recent call last):
  File "/usr/local/searx/searx-ve/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/searx/searx-ve/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/searx/searx-ve/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/searx/searx-ve/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/searx/searx-ve/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/searx/searx/webapp.py", line 544, in index
    result['title'] = highlight_content(escape(result['title'] or u''), search_query.query)
  File "/usr/local/searx/searx/utils.py", line 79, in highlight_content
    if content.lower().find(query.lower()) > -1:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)
```


Discussion:
Probably related to the engine "flickr" because that's the only one doing this error on search.snopyta.org but I can't reproduce the same bug with "flickr" engine enabled by default on my instance: https://searx.be/?q=kek&time_range=&language=en-US&category_images=on

Maybe flickr gives back results with non unicode due to the location of the instance?
This mostly likely is a double-encoding error in `flickr_noapi.py` which can be fixed by removing the calls to encode('utf-8'), like so:

```patch
diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py
index e1abb378..c8ee34f7 100644
--- a/searx/engines/flickr_noapi.py
+++ b/searx/engines/flickr_noapi.py
@@ -118,9 +118,9 @@ def response(resp):
             'template': 'images.html'
         }
         try:
-            result['author'] = author.encode('utf-8')
-            result['title'] = title.encode('utf-8')
-            result['content'] = content.encode('utf-8')
+            result['author'] = author
+            result['title'] = title
+            result['content'] = content
         except:
             result['author'] = ''
             result['title'] = ''
```

Resolving patch:
diff --git a/searx/engines/flickr_noapi.py b/searx/engines/flickr_noapi.py
--- a/searx/engines/flickr_noapi.py
+++ b/searx/engines/flickr_noapi.py
@@ -118,9 +118,9 @@ def response(resp):
             'template': 'images.html'
         }
         try:
-            result['author'] = author.encode('utf-8')
-            result['title'] = title.encode('utf-8')
-            result['content'] = content.encode('utf-8')
+            result['author'] = author
+            result['title'] = title
+            result['content'] = content
         except:
             result['author'] = ''
             result['title'] = ''


Test patch: