Showing
2 changed files
with
4 additions
and
4 deletions
| @@ -45,7 +45,7 @@ module Kanjai | @@ -45,7 +45,7 @@ module Kanjai | ||
| 45 | elements.each do |item| | 45 | elements.each do |item| |
| 46 | case item[:name] | 46 | case item[:name] |
| 47 | when 'text' | 47 | when 'text' |
| 48 | - content = item[:source] | 48 | + content = item[:source].to_s.strip |
| 49 | if current_page | 49 | if current_page |
| 50 | content = content.gsub('###link###', current_page.menu_url(session[:scheme], lang = nil)) | 50 | content = content.gsub('###link###', current_page.menu_url(session[:scheme], lang = nil)) |
| 51 | .gsub('###title###', current_page.lang_attributes(I18n.locale, :title)) | 51 | .gsub('###title###', current_page.lang_attributes(I18n.locale, :title)) |
| @@ -173,7 +173,7 @@ module Kanjai | @@ -173,7 +173,7 @@ module Kanjai | ||
| 173 | case item[:name] | 173 | case item[:name] |
| 174 | when 'text' | 174 | when 'text' |
| 175 | lang = domain.page_langs.find_by_code(session[:current_locale]) | 175 | lang = domain.page_langs.find_by_code(session[:current_locale]) |
| 176 | - content = item[:source] | 176 | + content = item[:source].to_s.strip |
| 177 | content = content.gsub('###CURRENT_LANG_TITLE###', lang.title) | 177 | content = content.gsub('###CURRENT_LANG_TITLE###', lang.title) |
| 178 | .gsub('###CURRENT_LANG_CODE###', lang.code) | 178 | .gsub('###CURRENT_LANG_CODE###', lang.code) |
| 179 | subparts << content | 179 | subparts << content |
| @@ -239,7 +239,7 @@ module Kanjai | @@ -239,7 +239,7 @@ module Kanjai | ||
| 239 | elements.each do |item| | 239 | elements.each do |item| |
| 240 | case item[:name] | 240 | case item[:name] |
| 241 | when 'text' | 241 | when 'text' |
| 242 | - subparts << self.replace_text_marker(subparts.parent.name, item[:source], hash_value) | 242 | + subparts << self.replace_text_marker(subparts.parent.name, item[:source].to_s.strip, hash_value) |
| 243 | when 'repeat' | 243 | when 'repeat' |
| 244 | repeat_id = item[:attributes]['id'] | 244 | repeat_id = item[:attributes]['id'] |
| 245 | @repeat_type_index[repeat_id] ||= 0 | 245 | @repeat_type_index[repeat_id] ||= 0 |