From 0d187c5c711c5381872c21309fa74087b4896c49 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 19 May 2014 00:16:28 +0100 Subject: [PATCH 1/1] Replace and with Unicode markers in titles --- app/helpers/title_helper.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/helpers/title_helper.rb b/app/helpers/title_helper.rb index da4ad8967..8cacdf208 100644 --- a/app/helpers/title_helper.rb +++ b/app/helpers/title_helper.rb @@ -1,6 +1,11 @@ module TitleHelper def set_title(title = false) - response.headers["X-Page-Title"] = t('layouts.project_name.title') + (title ? ' | ' + title : '') - @title = title + if title + @title = title.gsub("", "\u202a").gsub("", "\u202c") + response.headers["X-Page-Title"] = t('layouts.project_name.title') + ' | ' + @title + else + @title = title + response.headers["X-Page-Title"] = t('layouts.project_name.title') + end end end -- 2.43.2