mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-03 19:41:39 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user