Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r17186 r17228  
    1818 * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
    1919 * http://www.gnu.org/licenses/gpl.html
    20  * 
     20 *
    2121 * [kses strips evil scripts!]
    2222 *
     
    2929 * @package External
    3030 * @subpackage KSES
     31 *
    3132 */
    3233
     
    554555    $pass_allowed_html = $allowed_html;
    555556    $pass_allowed_protocols = $allowed_protocols;
    556     return preg_replace_callback('%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%',
    557         create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string);
     557    return preg_replace_callback( '%((<!--.*?(-->|$))|(<[^>]*(>|$)|>))%', '_wp_kses_split_callback', $string );
     558}
     559
     560/**
     561 * Callback for wp_kses_split.
     562 *
     563 * @since 3.1.0
     564 * @access private
     565 */
     566function _wp_kses_split_callback( $match ) {
     567    global $pass_allowed_html, $pass_allowed_protocols;
     568    return wp_kses_split2( $match[1], $pass_allowed_html, $pass_allowed_protocols );
    558569}
    559570
Note: See TracChangeset for help on using the changeset viewer.