summaryrefslogtreecommitdiff
path: root/packages/backend/src/misc
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-11-29 19:16:05 +0900
committerGitHub <noreply@github.com>2025-11-29 19:16:05 +0900
commit27320344470f7c2457216ab64eecb5e513417ac4 (patch)
tree8eec493ed429d63de1c089f6e1fcdb0aeca18de8 /packages/backend/src/misc
parent[skip ci] Update CHANGELOG.md (prepend template) (diff)
downloadmisskey-27320344470f7c2457216ab64eecb5e513417ac4.tar.gz
misskey-27320344470f7c2457216ab64eecb5e513417ac4.tar.bz2
misskey-27320344470f7c2457216ab64eecb5e513417ac4.zip
perf(backend): jsdom、happy-domをやめて軽量な実装にし、メモリ削減・高速化 (#16885)
* wip * Update packages/backend/src/server/api/endpoints/i/update.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/FetchInstanceMetadataService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * remove some packages * コミット漏れ * clean up * fix * Update MfmService.ts * fix * fix * Update MfmService.ts * wip * rename * Update packages/backend/src/core/MfmService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/MfmService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/MfmService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/MfmService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/activitypub/ApRendererService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/MfmService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update packages/backend/src/core/MfmService.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update MfmService.ts * Update CHANGELOG.md --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/misc')
-rw-r--r--packages/backend/src/misc/escape-html.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/backend/src/misc/escape-html.ts b/packages/backend/src/misc/escape-html.ts
new file mode 100644
index 0000000000..819aeeed52
--- /dev/null
+++ b/packages/backend/src/misc/escape-html.ts
@@ -0,0 +1,13 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export function escapeHtml(text: string): string {
+ return text
+ .replace(/&/g, '&amp;')
+ .replace(/</g, '&lt;')
+ .replace(/>/g, '&gt;')
+ .replace(/"/g, '&quot;')
+ .replace(/'/g, '&#039;');
+}