MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / htmlEscape

Function htmlEscape

clean/clean.ts:13–17  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

11
12// HTML 转义函数(必需)
13const htmlEscape = (text: string): string =>
14 text.replace(/[&<>"']/g, m => ({
15 '&': '&amp;', '<': '&lt;', '>': '&gt;',
16 '"': '&quot;', "'": '&#x27;'
17 }[m] || m));
18
19// 延迟函数
20const sleep = (ms: number): Promise<void> =>

Callers 5

handleCleanMethod · 0.70
handleDeletedCleanMethod · 0.70
handleBlockedCleanMethod · 0.70
sendErrorMethod · 0.70
handleErrorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected