Changeset 6026 for trunk/wp-includes/formatting.php
- Timestamp:
- 09/03/2007 11:32:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r6015 r6026 18 18 } 19 19 20 $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 20 $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 21 21 $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace); 22 22 … … 132 132 if ( $value < 128 ) { 133 133 if ( $length && ( strlen($unicode) + 1 > $length ) ) 134 break; 134 break; 135 135 $unicode .= chr($value); 136 136 } else { … … 651 651 // HTML loop taken from texturize function, could possible be consolidated 652 652 $textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between 653 $stop = count($textarr);// loop stuff 654 for ($i = 0; $i < $stop; $i++) { 655 $content = $textarr[$i]; 656 if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag 657 $content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content); 658 } 659 $output .= $content; 653 $stop = count($textarr);// loop stuff 654 for ($i = 0; $i < $stop; $i++) { 655 $content = $textarr[$i]; 656 if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag 657 $content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content); 658 } 659 $output .= $content; 660 660 } 661 661 } else { … … 1086 1086 $url = str_replace(';//', '://', $url); 1087 1087 /* If the URL doesn't appear to contain a scheme, we 1088 * presume it needs http:// appended (unless a relative 1088 * presume it needs http:// appended (unless a relative 1089 1089 * link starting with / or a php file). 1090 1090 */ … … 1095 1095 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1096 1096 if ( !is_array($protocols) ) 1097 $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); 1097 $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); 1098 1098 if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) 1099 1099 return '';
Note: See TracChangeset
for help on using the changeset viewer.