MCPcopy Create free account
hub / github.com/developit/snarkdown / encodeAttr

Function encodeAttr

src/index.js:21–23  ·  view source on GitHub ↗

Encode special attribute characters to HTML entities in a String. * @private

(str)

Source from the content-addressed store, hash-verified

19 * @private
20 */
21function encodeAttr(str) {
22 return (str+'').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
23}
24
25/** Parse Markdown into an HTML String. */
26export default function parse(md, prevLinks) {

Callers 1

parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…