Skip to content

A platform for community discussion. Free, open, simple.

FIX: Keep highlighted text for quoted replies by ignored users (#7345)

Tarek Khalil307499e48b0b
diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
index 4c36e30411e..cedbcea88b4 100644
--- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
+++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
@@ -145,7 +145,11 @@ export default class PostCooked {
const $blockQuote = $("> blockquote", $aside);
$aside.data("original-contents", $blockQuote.html());
- const originalText = $blockQuote.text().trim();
+ const originalText =
+ $blockQuote.text().trim() ||
+ $("> blockquote", this.attrs.cooked)
+ .text()
+ .trim();
$blockQuote.html(I18n.t("loading"));
let topicId = this.attrs.topicId;
if ($aside.data("topic")) {
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index e9c479eaee2..7833fe2a51f 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -2243,7 +2243,7 @@ en:
quote_reply: "Quote"
edit_reason: "Reason: "
post_number: "post {{number}}"
- ignored: "Hidden content"
+ ignored: "Ignored content"
wiki_last_edited_on: "wiki last edited on"
last_edited_on: "post last edited on"
reply_as_new_topic: "Reply as linked Topic"
@@ -2251,7 +2251,7 @@ en:
continue_discussion: "Continuing the discussion from {{postLink}}:"
follow_quote: "go to the quoted post"
show_full: "Show Full Post"
- show_hidden: "View hidden content."
+ show_hidden: "View ignored content."
deleted_by_author:
one: "(post withdrawn by author, will be automatically deleted in %{count} hour unless flagged)"
other: "(post withdrawn by author, will be automatically deleted in %{count} hours unless flagged)"
diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml
index 7c22c17629a..5449fb46875 100644
--- a/config/locales/server.en.yml
+++ b/config/locales/server.en.yml
@@ -880,7 +880,7 @@ en:
user_must_edit: "<p>This post was flagged by the community and is temporarily hidden.</p>"
ignored:
- hidden_content: "<p>Hidden content</p>"
+ hidden_content: "<p>Ignored content</p>"
archetypes:
regular: