From 2dec1cb0363b0f31a1d9f9ff258ce31141a145e1 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Wed, 4 Oct 2017 18:57:47 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/wp-sanitize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/wp-sanitize.js b/src/wp-includes/js/wp-sanitize.js index 8063c6b3f6..312dab2719 100644 --- a/src/wp-includes/js/wp-sanitize.js +++ b/src/wp-includes/js/wp-sanitize.js @@ -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' );