From: Tom Hughes Date: Sun, 18 May 2014 23:16:28 +0000 (+0100) Subject: Replace and with Unicode markers in titles X-Git-Tag: live~4405 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/0d187c5c711c5381872c21309fa74087b4896c49?hp=1eab367de5950af5396756dbf09cc9bd3edc3b8f Replace and with Unicode markers in titles --- 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