WordPress.org

Make WordPress Core

Changeset 18742


Ignore:
Timestamp:
09/21/2011 08:39:21 PM (8 years ago)
Author:
duck_
Message:

wp_strip_all_tags() in wp_trim_words() to remove CSS and JS within tags. Props evansolomon. Fixes #18726.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r18738 r18742  
    18851885        $more = __( '…' );
    18861886    $original_text = $text;
    1887     $text = strip_tags( $text );
     1887    $text = wp_strip_all_tags( $text );
    18881888    $words_array = preg_split( "/[\n\r\t ]+/", $text, $num_words + 1, PREG_SPLIT_NO_EMPTY );
    18891889    if ( count( $words_array ) > $num_words ) {
Note: See TracChangeset for help on using the changeset viewer.