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

1 line
397 B
JavaScript
Raw Normal View History

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