MCPcopy
hub / github.com/killbill/killbill / escape

Function escape

profiles/killpay/src/main/webapp/lib/marked.js:1076–1083  ·  view source on GitHub ↗

* Helpers

(html, encode)

Source from the content-addressed store, hash-verified

1074 */
1075
1076function escape(html, encode) {
1077 return html
1078 .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&')
1079 .replace(/</g, '&lt;')
1080 .replace(/>/g, '&gt;')
1081 .replace(/"/g, '&quot;')
1082 .replace(/'/g, '&#39;');
1083}
1084
1085function unescape(html) {
1086 return html.replace(/&([#\w]+);/g, function(_, n) {

Callers 3

marked.jsFile · 0.85
markedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected