File: wp-sanitize.min.js

package info (click to toggle)
wordpress 5.0.15%2Bdfsg1-0%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 93,856 kB
  • sloc: javascript: 277,559; php: 181,240; cs: 6,126; sh: 482; xml: 59; makefile: 13
file content (1 line) | stat: -rw-r--r-- 381 bytes parent folder | download
1
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),e=document.createElement("textarea");try{e.innerHTML=t,t=wp.sanitize.stripTags(e.value)}catch(e){}return t}};