Security: Rename new wp.sanitize.sanitizeText to stripTagsAndEncodeText.'

Improve function naming: this function strips tags from a string and also encodes any HTML entities.

Props ocean90.

Fixes #40635.


git-svn-id: https://develop.svn.wordpress.org/trunk@41745 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Adam Silverstein
2017-10-04 18:57:47 +00:00
parent e4df8c04b1
commit 2dec1cb036

View File

@@ -32,7 +32,7 @@
*
* @return Sanitized text. False on failure.
*/
sanitizeText: function( text ) {
stripTagsAndEncodeText: function( text ) {
var _text = wp.sanitize.stripTags( text ),
textarea = document.createElement( 'textarea' );