MCPcopy Create free account
hub / github.com/SiyuanJia/brief / escapeHTMLBasic

Function escapeHTMLBasic

script.js:457–462  ·  view source on GitHub ↗
(s = '')

Source from the content-addressed store, hash-verified

455
456// === 新:将 mainText 中的 [R]/[B]/[G]/[Y] 标签渲染为带颜色的高亮 ===
457function escapeHTMLBasic(s = '') {
458 return String(s)
459 .replace(/&/g, '&')
460 .replace(/</g, '&lt;')
461 .replace(/>/g, '&gt;');
462}
463
464function renderTextWithBracketTags(text = '') {
465 let s = String(text || '').replace(/\r\n/g, '\n');

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected