|
@@ -395,11 +395,9 @@ def index():
|
395
|
395
|
search.paging = True
|
396
|
396
|
|
397
|
397
|
if search.request_data.get('format', 'html') == 'html':
|
398
|
|
- if 'content' in result:
|
399
|
|
- result['content'] = highlight_content(result['content'],
|
400
|
|
- search.query.encode('utf-8')) # noqa
|
401
|
|
- result['title'] = highlight_content(result['title'],
|
402
|
|
- search.query.encode('utf-8'))
|
|
398
|
+ if 'content' in result and result['content']:
|
|
399
|
+ result['content'] = highlight_content(result['content'][:1024], search.query.encode('utf-8'))
|
|
400
|
+ result['title'] = highlight_content(result['title'], search.query.encode('utf-8'))
|
403
|
401
|
else:
|
404
|
402
|
if result.get('content'):
|
405
|
403
|
result['content'] = html_to_text(result['content']).strip()
|
|
@@ -559,7 +557,6 @@ def preferences():
|
559
|
557
|
lang = request.preferences.get_value('language')
|
560
|
558
|
disabled_engines = request.preferences.engines.get_disabled()
|
561
|
559
|
allowed_plugins = request.preferences.plugins.get_enabled()
|
562
|
|
- results_on_new_tab = request.preferences.get_value('results_on_new_tab')
|
563
|
560
|
|
564
|
561
|
# stats for preferences page
|
565
|
562
|
stats = {}
|