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

Function htmlEscape

subinfo/subinfo.ts:73–78  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

71// --- 工具函数 ---
72
73// HTML实体转义
74const isHttpUrl = (text: string): boolean => /^https?:\/\//i.test(text);
75const formatRawUrl = (url: string, isTxtOutput: boolean): string => isTxtOutput ? url : htmlEscape(url);
76
77// Markdown特殊字符转义 (用于TXT输出)
78function markdownEscape(text: string): string {
79 return text.replace(/([*`>#+\-.!_[\](){}])/g, '\\$1');
80}
81

Callers 5

formatRawUrlFunction · 0.70
codeTagMethod · 0.70
boldTagMethod · 0.70
handleSubinfoMethod · 0.70
handleChaMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected