From 99bdad8091892b1cbf04e60a2409993e00e7028a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 6 Oct 2023 12:13:40 -0400 Subject: [PATCH] fix: #12062, relax blockquote selector so it works with plugins like lightgallery that wrap post/content --- public/src/client/topic/posts.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index f8ae9a49ea..cc4f4bda3d 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -439,8 +439,10 @@ define('forum/topic/posts', [ } Posts.addBlockquoteEllipses = function (posts) { - const blockquotes = posts.find('[component="post/content"] > blockquote > blockquote'); - blockquotes.each(function () { + const rootBlockQuotes = posts.find('[component="post/content"] blockquote') + .filter((i, el) => !$(el).parent().is('blockquote')); + const nestedBlockQuote = rootBlockQuotes.find('>blockquote'); + nestedBlockQuote.each(function () { const $this = $(this); if ($this.find(':hidden:not(br)').length && !$this.find('.toggle').length) { $this.append('');