fixed chinese issue of site title

This commit is contained in:
Harry Bomrah 2014-06-30 18:08:48 +08:00
parent 3155c44a5e
commit 823aafd819
3 changed files with 5 additions and 2 deletions

View File

@ -42,7 +42,9 @@ class PagesController < ApplicationController
else
if path.last.include? '-'
params[:page_id] = path[-2]
params[:slug] = path[-1]
s = CGI.unescape(path[-1])
s.encode!('UTF-8')
params[:slug] = s
uid = path[-1].split("-").last
uid = uid.split("?").first
params[:uid] = uid

View File

@ -1,3 +1,4 @@
# encoding: utf-8
require "json"
module ApplicationHelper
def render_widget(widget)

View File

@ -1,7 +1,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<%= favicon_link_tag (current_site.favicon.blank? ? 'favicon.ico' : current_site.favicon.url) %>
<title>Orbit Classic</title>
<title><%= render_site_title %></title>
<%= stylesheet_link_tag "fontawesome/font-awesome"%>
<%= stylesheet_link_tag "bootstrap/bootstrap"%>
<%= stylesheet_link_tag "template/template"%>