Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3392643
D5715.id18796.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
663 B
Referenced Files
None
Subscribers
None
D5715.id18796.diff
View Options
diff --git a/lib/shared/messages/text-message-spec.js b/lib/shared/messages/text-message-spec.js
--- a/lib/shared/messages/text-message-spec.js
+++ b/lib/shared/messages/text-message-spec.js
@@ -84,9 +84,11 @@
messageTitle({ messageInfo, markdownRules }) {
const { text } = messageInfo;
+ const textReplacingSpoilers = text.replace(/\|\|(.+?)\|\|/g, '⬛⬛⬛');
const parser = SimpleMarkdown.parserFor(markdownRules);
- const ast = parser(text, { disableAutoBlockNewlines: true });
-
+ const ast = parser(textReplacingSpoilers, {
+ disableAutoBlockNewlines: true,
+ });
return getFirstNonQuotedRawLine(ast).trim();
},
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 1, 9:35 AM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2604581
Default Alt Text
D5715.id18796.diff (663 B)
Attached To
Mode
D5715: [lib] Prevent spoiler text from appearing in MessagePreview
Attached
Detach File
Event Timeline
Log In to Comment