Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

people: Work around Safari 17 /\p{C}/u bug.

Anders Kaseorg1668ec5dfe81
diff --git a/web/src/people.ts b/web/src/people.ts
index 7dbadf39e7e..5f689689629 100644
--- a/web/src/people.ts
+++ b/web/src/people.ts
@@ -683,7 +683,10 @@ export function pm_perma_link(message: Message): string | undefined {
}
export function get_slug_from_full_name(full_name: string): string {
- return internal_url.encodeHashComponent(full_name.replaceAll(/[ "%/<>`\p{C}]+/gu, "-"));
+ // We don't use \p{C} or \p{Cs} due to https://bugs.webkit.org/show_bug.cgi?id=267011
+ return internal_url.encodeHashComponent(
+ full_name.replaceAll(/[ "%/<>`\p{Cc}\p{Cf}\p{Co}\p{Cn}]+/gu, "-"),
+ );
}
export function pm_with_url(message: Message | MessageWithBooleans): string | undefined {