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

Function escapeAttribute

bs/bs.ts:180–195  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

178}
179
180function escapeAttribute(text: string): string {
181 return (text || "").replace(/[&<>"]/g, (ch) => {
182 switch (ch) {
183 case "&":
184 return "&amp;";
185 case "<":
186 return "&lt;";
187 case ">":
188 return "&gt;";
189 case '"':
190 return "&quot;";
191 default:
192 return ch;
193 }
194 });
195}
196
197function resolveEntityUsername(entity: any): string | undefined {
198 if (!entity) return undefined;

Callers 4

buildForwardedLinkTagsFunction · 0.85
sendSourceFeedbackFunction · 0.85
sendTargetFeedbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected