Ticket #3201: 3201.diff
File 3201.diff, 1.5 KB (added by , 18 years ago) |
---|
-
wp-includes/formatting.php
609 609 if (get_option('use_smilies')) { 610 610 // HTML loop taken from texturize function, could possible be consolidated 611 611 $textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between 612 $stop = count($textarr);// loop stuff 613 for ($i = 0; $i < $stop; $i++) { 614 $content = $textarr[$i]; 615 if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag 616 $content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content); 617 } 618 $output .= $content; 619 } 612 $output = implode('', preg_replace($wp_smiliessearch, $wp_smiliesreplace, $textarr)); 620 613 } else { 621 614 // return default text. 622 615 $output = $text; -
wp-includes/vars.php
87 87 88 88 // generates smilies' search & replace arrays 89 89 foreach($wpsmiliestrans as $smiley => $img) { 90 $wp_smiliessearch[] = '/(\s|^ )?'.preg_quote($smiley, '/').'(\b|\s)/';90 $wp_smiliessearch[] = '/(\s|^|[^<])?'.preg_quote($smiley, '/').'(\b|\s|$)/'; 91 91 $smiley_masked = htmlspecialchars( trim($smiley) , ENT_QUOTES); 92 92 $wp_smiliesreplace[] = " <img src='" . get_option('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> "; 93 93 }