aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/application.rb')
-rw-r--r--app/controllers/application.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/application.rb b/app/controllers/application.rb
index 0f151874a..e36d21e22 100644
--- a/app/controllers/application.rb
+++ b/app/controllers/application.rb
@@ -6,7 +6,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: application.rb,v 1.43 2008-04-30 01:42:39 francis Exp $
+# $Id: application.rb,v 1.44 2008-04-30 02:14:07 francis Exp $
class ApplicationController < ActionController::Base
@@ -161,11 +161,7 @@ class ApplicationController < ActionController::Base
@search_results = xapian_object.results
@search_hits = xapian_object.matches_estimated
@search_spelling = xapian_object.spelling_correction
-
- # Calculate simple word highlighting view code for users and public bodies
- query_nopunc = @query.gsub(/[^a-z0-9]/i, " ")
- query_nopunc = query_nopunc.gsub(/\s+/, " ")
- @highlight_words = query_nopunc.split(" ")
+ @highlight_words = xapian_object.words_to_highlight
end
# URL generating functions are needed by all controllers (for redirects),