MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / encodeHTML

Function encodeHTML

src/lib/util.js:79–87  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

77}
78
79export function encodeHTML(text) {
80 return String(text)
81 .replace(/&/g, '&')
82 .replace(/</g, '&lt;')
83 .replace(/>/g, '&gt;')
84 .replace(/"/g, '&quot;')
85 .replace(/'/g, '&#039;')
86 .replace(/\//g, '&#x2F;');
87}
88
89function decodeHTML(html) {
90 return String(html)

Callers 5

parseMIMEFunction · 0.90
renderSuggestionFunction · 0.90
onVerifiedMessageFunction · 0.90
onAttachmentsMethod · 0.90
setMessageMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected