diff options
-rw-r--r-- | app/controllers/application_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 085baf1..dfab86e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -77,7 +77,8 @@ class ApplicationController < ActionController::Base response.content_type = "application/xhtml+xml" # remove invalid charactors - response.body = response.body.gsub(/[\x0-\x8\xb\xc\xe-\x1f]/, "") + u = ActiveSupport::Multibyte::Unicode + response.body = u.tidy_bytes(response.body) end end end |