UNPKG

ant-design-x-vue-next

Version:

Ant Design X for Vue — community continuation aligned with @ant-design/x

2 lines (1 loc) 436 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},a=/[&<>"'/]/,n=/[&<>"'/]/g,o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,p=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,t=e=>s[e];function r(e,c){if(c){if(a.test(e))return e.replace(n,t)}else if(o.test(e))return e.replace(p,t);return e}exports.escapeHtml=r;