mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-28 16:36:48 +09:00
Quote a mention as text when replying
Replying swaps each mention in the quoted copy for its text. Assigning
that text to outerHTML parsed it as html; replace the mention with a
text node instead.
(cherry picked from commit 6052b123d5)
This commit is contained in:
1 parent
6ba5d2ece3
commit
049fc920d3
2 files changed
+15
-1
No files matched your search
@@ -28,7 +28,7 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
#stripMentionAttachments(node) {
|
||||
node.querySelectorAll(".mention").forEach(mention => mention.outerHTML = mention.textContent.trim())
|
||||
node.querySelectorAll(".mention").forEach(mention => mention.replaceWith(mention.textContent.trim()))
|
||||
return node
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user