MCPcopy Create free account
hub / github.com/dajie111/nodeseek-userscript / escapeHtml

Function escapeHtml

notes.js:1184–1188  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

1182 }
1183
1184 function escapeHtml(str){
1185 return String(str).replace(/[&<>"']/g, (ch)=>({
1186 '&':'&amp;','<':'&lt;','>':'&gt;','\"':'&quot;','\'':'&#39;'
1187 })[ch]);
1188 }
1189
1190 // Markdown 转 HTML 函数
1191 function convertMarkdownToHTML(markdown) {

Callers 1

buildToolbarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected