WordPress/wp-includes/js/wp-sanitize.min.js
Aaron Jorbin a870c7e8f3 Build/Test: Update dependencies for 5.0
Updates package dependencies to more modern versions, also adds .nvmrc and package-lock.json as followups to [43683] and [43571].

See #44600.
Fixes #45064.


Built from https://develop.svn.wordpress.org/branches/5.0@43684


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-09 02:52:45 +00:00

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}};