Changeset 11098 for trunk/wp-includes/formatting.php
- Timestamp:
- 04/27/2009 04:17:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r11070 r11098 774 774 775 775 /** 776 * Callback used to change %uXXXX to &#YYY; syntax 777 * 778 * @since 2.8? 779 * 780 * @param array $matches Single Match 781 * @return string An HTML entity 782 */ 783 function funky_javascript_callback($matches) { 784 return "&#".base_convert($matches[1],16,10).";"; 785 } 786 787 /** 776 788 * Fixes javascript bugs in browsers. 777 789 * … … 789 801 global $is_macIE, $is_winIE; 790 802 791 /** @todo use preg_replace_callback() instead */792 803 if ( $is_winIE || $is_macIE ) 793 $text = preg_replace("/\%u([0-9A-F]{4,4})/e", "'&#'.base_convert('\\1',16,10).';'", $text); 804 $text = preg_replace_callback("/\%u([0-9A-F]{4,4})/", 805 "funky_javascript_callback", 806 $text); 794 807 795 808 return $text;
Note: See TracChangeset
for help on using the changeset viewer.