WordPress.org

Make WordPress Core

Changeset 41745


Ignore:
Timestamp:
10/04/2017 06:57:47 PM (10 months ago)
Author:
adamsilverstein
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wp-sanitize.js

    r41379 r41745  
    3333         * @return Sanitized text. False on failure.
    3434         */
    35         sanitizeText: function( text ) {
     35        stripTagsAndEncodeText: function( text ) {
    3636            var _text = wp.sanitize.stripTags( text ),
    3737                textarea = document.createElement( 'textarea' );
Note: See TracChangeset for help on using the changeset viewer.