Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(mattermost): use ES2020-compatible text escaping

Tin948626a2fc3e
diff --git a/apps/api/src/plugins/mattermost/events.ts b/apps/api/src/plugins/mattermost/events.ts
index 5e5a957a3..3c00916de 100644
--- a/apps/api/src/plugins/mattermost/events.ts
+++ b/apps/api/src/plugins/mattermost/events.ts
@@ -35,9 +35,9 @@ function isEnabled(config: MattermostConfig, key: MattermostEventKey): boolean {
function escapeText(text: string): string {
return text
- .replaceAll("&", "&")
- .replaceAll("<", "&lt;")
- .replaceAll(">", "&gt;");
+ .replace(/&/g, "&amp;")
+ .replace(/</g, "&lt;")
+ .replace(/>/g, "&gt;");
}
function toSentenceCase(value: string | null): string {