WordPress/wp-includes/js/wp-sanitize.min.js

1 line
381 B
JavaScript

window.wp=window.wp||{},wp.sanitize={stripTags:function(e){return(e=e||"").replace(/<!--[\s\S]*?(-->|$)/g,"").replace(/<(script|style)[^>]*>[\s\S]*?(<\/\1>|$)/gi,"").replace(/<\/?[a-z][\s\S]*?(>|$)/gi,"")},stripTagsAndEncodeText:function(e){var t=wp.sanitize.stripTags(e),i=document.createElement("textarea");try{i.innerHTML=t,t=wp.sanitize.stripTags(i.value)}catch(e){}return t}};