summaryrefslogtreecommitdiff
path: root/app/controllers/config_gigaset_controller.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-12-11 11:44:39 +0000
committerPeter Kozak <spag@golwen.net>2013-12-11 11:44:39 +0000
commitaf9357054445d02f32cb6fc8c69ea9eec438eaaf (patch)
tree1c940d148415f2205fef5f0d993e929a33f297e5 /app/controllers/config_gigaset_controller.rb
parent97710aea6d75e16a0442f4d05d93a6b89ad3dc6c (diff)
Replace unknown characters with _
Diffstat (limited to 'app/controllers/config_gigaset_controller.rb')
-rw-r--r--app/controllers/config_gigaset_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/config_gigaset_controller.rb b/app/controllers/config_gigaset_controller.rb
index 7a03860..e8581b0 100644
--- a/app/controllers/config_gigaset_controller.rb
+++ b/app/controllers/config_gigaset_controller.rb
@@ -450,7 +450,7 @@ class ConfigGigasetController < ApplicationController
phone_book_ids << phone_book.id
end
- ln = params[:ln].to_s.encode!('UTF-8', 'UTF-8', :invalid => :replace).gsub(/[^0-9a-zA-Z-_]/,'') + '%'
+ ln = params[:ln].to_s.encode!('UTF-8', 'UTF-8', :invalid => :replace).gsub(/[^0-9a-zA-Z-_]/,'_') + '%'
hm = params[:hm].to_s + '%'
@phone_book_entries = PhoneBookEntry.where(:phone_book_id => phone_book_ids).where('last_name LIKE ?', ln).order(:last_name).order(:first_name).limit(MAX_DIRECTORY_ENTRIES)