Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32257909
D8908.1765243035.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
698 B
Referenced Files
None
Subscribers
None
D8908.1765243035.diff
View Options
diff --git a/lib/shared/mention-utils.js b/lib/shared/mention-utils.js
--- a/lib/shared/mention-utils.js
+++ b/lib/shared/mention-utils.js
@@ -52,6 +52,10 @@
const chatMentionRegexString = `^(?<!\\\\)(@\\[\\[(${idSchemaRegex}):(.{1,${chatNameMaxLength}}?)(?<!\\\\)\\]\\])`;
const chatMentionRegex: RegExp = new RegExp(chatMentionRegexString);
+function encodeChatMentionText(text: string): string {
+ return text.replace(/]/g, '\\]');
+}
+
function decodeChatMentionText(text: string): string {
return text.replace(/\\]/g, ']');
}
@@ -138,5 +142,6 @@
getTypeaheadRegexMatches,
getUserMentionsCandidates,
chatMentionRegex,
+ encodeChatMentionText,
decodeChatMentionText,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 9, 1:17 AM (13 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5851879
Default Alt Text
D8908.1765243035.diff (698 B)
Attached To
Mode
D8908: [lib] Encode chat name in raw chat mention
Attached
Detach File
Event Timeline
Log In to Comment