General: Further preserve back-compat for wp.sanitize.stripTags() to return empty string when falsy value supplied.
Developed in https://github.com/WordPress/wordpress-develop/pull/10856 Follow-up to [61578], [61347], [60907]. Props jonsurrell, hugod, westonruter. See #64274. Fixes #64574. Built from https://develop.svn.wordpress.org/trunk@61585 git-svn-id: http://core.svn.wordpress.org/trunk@60896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* @return {string} Stripped text.
|
||||
*/
|
||||
stripTags: function( text ) {
|
||||
if ( null === text || 'undefined' === typeof text ) {
|
||||
if ( ! text ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
2
wp-includes/js/wp-sanitize.min.js
vendored
2
wp-includes/js/wp-sanitize.min.js
vendored
@@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
window.wp=window.wp||{},wp.sanitize={stripTags:function(t){return null==t?"":((t=(new DOMParser).parseFromString(t,"text/html")).body.innerText=t.body.innerText,t.body.innerHTML)},stripTagsAndEncodeText:function(t){let e=wp.sanitize.stripTags(t),n=document.createElement("textarea");try{n.textContent=e,e=wp.sanitize.stripTags(n.value)}catch(t){}return e}};
|
||||
window.wp=window.wp||{},wp.sanitize={stripTags:function(t){return t?((t=(new DOMParser).parseFromString(t,"text/html")).body.innerText=t.body.innerText,t.body.innerHTML):""},stripTagsAndEncodeText:function(t){let e=wp.sanitize.stripTags(t),n=document.createElement("textarea");try{n.textContent=e,e=wp.sanitize.stripTags(n.value)}catch(t){}return e}};
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61584';
|
||||
$wp_version = '7.0-alpha-61585';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user