app/controllers/application.rb in parlement-0.11 vs app/controllers/application.rb in parlement-0.12

- old
+ new

@@ -6,11 +6,12 @@ class ApplicationController < ActionController::Base include LoginEngine include Term::ANSIColor - before_filter :set_charset + init_gettext "parlement" + before_filter :set_login_from_cookie after_filter :fix_unicode_for_safari after_filter OutputCompressionFilter # automatically and transparently fixes utf-8 bug @@ -18,14 +19,9 @@ def fix_unicode_for_safari if headers["Content-Type"] == "text/html; charset=utf-8" and request.env['HTTP_USER_AGENT'].to_s.include? 'AppleWebKit' then response.body = response.body.gsub(/([^\x00-\xa0])/u) { |s| "&#x%x;" % $1.unpack('U')[0] } end - end - - def set_charset - #@headers["Content-Type"] = "text/html; charset=iso-8859-15" - headers["Content-Type"] = "text/html; charset=utf-8" end def set_login_from_cookie unless session[:person] if (person = Person.find_by_name(cookies[:person_name])) and \