Setting Content-Type to UTF-8, to be consistent with meta-data in the HTML itself
This commit is contained in:
parent
e619e575ce
commit
88d7dc832d
2 changed files with 31 additions and 1 deletions
|
@ -7,6 +7,7 @@ class ApplicationController < ActionController::Base
|
|||
# implements Instiki's legacy URLs
|
||||
require 'url_rewriting_hack'
|
||||
|
||||
before_filter :set_utf8_http_header
|
||||
after_filter :remember_location
|
||||
|
||||
# For injecting a different wiki model implementation. Intended for use in tests
|
||||
|
@ -31,7 +32,6 @@ class ApplicationController < ActionController::Base
|
|||
@@REMEMBER_NOT = ['locked', 'save']
|
||||
|
||||
def remember_location
|
||||
logger.debug @request.method
|
||||
if @response.headers['Status'] == '200 OK'
|
||||
unless @@REMEMBER_NOT.include? action_name or @request.method != :get
|
||||
@session[:return_to] = url_for
|
||||
|
@ -54,4 +54,8 @@ logger.debug @request.method
|
|||
end
|
||||
end
|
||||
|
||||
def set_utf8_http_header
|
||||
@response.headers['Content-Type'] = 'text/html; charset=UTF-8'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue