MCPcopy
hub / github.com/vivek9patel/vivek9patel.github.io / xss

Method xss

components/apps/terminal.js:332–352  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

330 }
331
332 xss(str) {
333 if (!str) return;
334 return str.split('').map(char => {
335 switch (char) {
336 case '&':
337 return '&amp';
338 case '<':
339 return '&lt';
340 case '>':
341 return '&gt';
342 case '"':
343 return '&quot';
344 case "'":
345 return '&#x27';
346 case '/':
347 return '&#x2F';
348 default:
349 return char;
350 }
351 }).join('');
352 }
353
354 render() {
355 return (

Callers 1

TerminalClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected