From 95a263212177a4944f96c927eae7f80bdd020105 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Thu, 14 Sep 2017 19:28:57 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/wp-sanitize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/js/wp-sanitize.js b/src/wp-includes/js/wp-sanitize.js index c03d163dac..8063c6b3f6 100644 --- a/src/wp-includes/js/wp-sanitize.js +++ b/src/wp-includes/js/wp-sanitize.js @@ -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;