From 804d30939f52b6fdbb70f97a386a6c0f19cf87e2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 3 Feb 2020 18:44:54 +0100 Subject: Fix punycode being rendered instead of unicode in some places (#13030) --- app/helpers/accounts_helper.rb | 2 +- app/views/accounts/_og.html.haml | 2 +- app/views/accounts/show.html.haml | 2 +- app/views/statuses/show.html.haml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb index 1a5f22e2a..5b6ab88e3 100644 --- a/app/helpers/accounts_helper.rb +++ b/app/helpers/accounts_helper.rb @@ -11,7 +11,7 @@ module AccountsHelper def acct(account) if account.local? - "@#{account.acct}@#{Rails.configuration.x.local_domain}" + "@#{account.acct}@#{site_hostname}" else "@#{account.pretty_acct}" end diff --git a/app/views/accounts/_og.html.haml b/app/views/accounts/_og.html.haml index de948ec6a..839576372 100644 --- a/app/views/accounts/_og.html.haml +++ b/app/views/accounts/_og.html.haml @@ -10,4 +10,4 @@ = opengraph 'og:image:width', '120' = opengraph 'og:image:height', '120' = opengraph 'twitter:card', 'summary' -= opengraph 'profile:username', account.local_username_and_domain += opengraph 'profile:username', acct(account)[1..-1] diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index bcfd3ff79..c54f66fe4 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -1,5 +1,5 @@ - content_for :page_title do - = "#{display_name(@account)} (@#{@account.local_username_and_domain})" + = "#{display_name(@account)} (#{acct(@account)})" - content_for :header_tags do %meta{ name: 'description', content: account_description(@account) }/ diff --git a/app/views/statuses/show.html.haml b/app/views/statuses/show.html.haml index 704e37a3d..fbeaa3d72 100644 --- a/app/views/statuses/show.html.haml +++ b/app/views/statuses/show.html.haml @@ -10,7 +10,7 @@ = opengraph 'og:site_name', site_title = opengraph 'og:type', 'article' - = opengraph 'og:title', "#{display_name(@account)} (@#{@account.local_username_and_domain})" + = opengraph 'og:title', "#{display_name(@account)} (#{acct(@account)})" = opengraph 'og:url', short_account_status_url(@account, @status) = render 'og_description', activity: @status -- cgit