wp.sanitize - fix namespace for calls to stripTags.

Fixes an `undefined` JavaScript error in PressThis since [41061].

Props afercia.
Fixes #41883.


git-svn-id: https://develop.svn.wordpress.org/trunk@41379 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Adam Silverstein 2017-09-14 19:28:57 +00:00
parent 9bdad8906a
commit 95a2632121

View File

@ -33,12 +33,12 @@
* @return Sanitized text. False on failure.
*/
sanitizeText: function( text ) {
var _text = wp.utils.stripTags( text ),
var _text = wp.sanitize.stripTags( text ),
textarea = document.createElement( 'textarea' );
try {
textarea.innerHTML = _text;
_text = wp.utils.stripTags( textarea.value );
_text = wp.sanitize.stripTags( textarea.value );
} catch ( er ) {}
return _text;