From aeb112ab5f488e4e89a9607fd043fdb9243bf6d0 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 17 Jan 2022 07:39:05 -0500 Subject: [PATCH] Fix bidi support in shared posts - Display was wrong when language direction was different between nickname and content --- src/Content/Text/BBCode.php | 4 ++-- view/templates/shared_content.tpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index 1f638c2f5..4c895f533 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1135,7 +1135,7 @@ class BBCode case self::API: $text = ($is_quote_share? '
' : '') . '' . html_entity_decode('♲', ENT_QUOTES, 'UTF-8') . ' ' . $author_contact['addr'] . ":
\n" . - '
' . $content . '
'; + '
' . $content . '
'; break; case self::DIASPORA: if (stripos(Strings::normaliseLink($attributes['link']), 'http://twitter.com/') === 0) { @@ -1160,7 +1160,7 @@ class BBCode $headline .= DI::l10n()->t('%2$s %3$s', $attributes['link'], $mention, $attributes['posted']); $headline .= ':

' . "\n"; - $text = ($is_quote_share? '
' : '') . $headline . '
' . trim($content) . '
' . "\n"; + $text = ($is_quote_share? '
' : '') . $headline . '
' . trim($content) . '
' . "\n"; break; case self::OSTATUS: diff --git a/view/templates/shared_content.tpl b/view/templates/shared_content.tpl index 4db3b66c5..c3a808d73 100644 --- a/view/templates/shared_content.tpl +++ b/view/templates/shared_content.tpl @@ -34,5 +34,5 @@ {{/if}} -
{{$content nofilter}}
+
{{$content nofilter}}