WordPress.org

Make WordPress Core

Ticket #6739: 6739_smilie_pattern.diff

File 6739_smilie_pattern.diff, 755 bytes (added by hailin, 10 years ago)

patch

  • C:/xampp/htdocs/wordpress_trunk/wp-includes/functions.php

     
    15051505
    15061506        $siteurl = get_option( 'siteurl' );
    15071507        foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
    1508                 $wp_smiliessearch[] = '/(\s|^)' . preg_quote( $smiley, '/' ) . '(\s|$)/';
     1508                $wp_smiliessearch[] = '/(\s*|^)' . preg_quote( $smiley, '/' ) . '(\s|$)/';
    15091509                $smiley_masked = attribute_escape( trim( $smiley ) );
    15101510                $wp_smiliesreplace[] = " <img src='$siteurl/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
    15111511        }