MCPcopy Index your code
hub / github.com/TanStack/ai / escapeHtml

Function escapeHtml

examples/vanilla-chat/src/main.js:159–163  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

157
158// Escape HTML to prevent XSS
159function escapeHtml(text) {
160 const div = document.createElement('div')
161 div.textContent = text
162 return div.innerHTML
163}
164
165// Initialize - render any existing messages
166renderMessages(client.getMessages())

Callers 1

renderMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected