From bb9015e8116f569f8b25555195fea9977c4b490d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 1 Feb 2022 11:58:04 +0100 Subject: [PATCH] DEV: uses innerHTML to decide if fast-edit is possible (#15760) We don't need raw to decide if we can fast edit or not, we will fetch the raw later when we do the replacement, but this step can be done directly from innerHTML. --- app/assets/javascripts/discourse/app/components/quote-button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/quote-button.js b/app/assets/javascripts/discourse/app/components/quote-button.js index 0c1ba275ca3..b4002f8604e 100644 --- a/app/assets/javascripts/discourse/app/components/quote-button.js +++ b/app/assets/javascripts/discourse/app/components/quote-button.js @@ -194,7 +194,7 @@ export default Component.extend(KeyEnterEscape, { if (this._canEditPost) { const regexp = new RegExp(regexSafeStr(quoteState.buffer), "gi"); - const matches = postBody.match(regexp); + const matches = cooked.innerHTML.match(regexp); if ( quoteState.buffer.length < 1 ||