Changeset 4990 for trunk/wp-includes/formatting.php
- Timestamp:
- 03/07/2007 05:29:15 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/formatting.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r4953 r4990 30 30 // static strings 31 31 $curl = str_replace($static_characters, $static_replacements, $curl); 32 33 32 // regular expressions 34 33 $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); 35 } elseif ( strstr($curl, '<code') || strstr($curl, '<pre') || strstr($curl, '<kbd') || strstr($curl, '<style') || strstr($curl, '<script') ) {34 } elseif (strpos($curl, '<code') !== false || strpos($curl, '<pre') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) { 36 35 $next = false; 37 36 } else { … … 79 78 $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\s*<br />!', "$1", $pee); 80 79 $pee = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee); 81 if ( strstr( $pee, '<pre' ))80 if (strpos($pee, '<pre') !== false) 82 81 $pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee); 83 82 $pee = preg_replace( "|\n</p>$|", '</p>', $pee ); … … 659 658 function is_email($user_email) { 660 659 $chars = "/^([a-z0-9+_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,6}\$/i"; 661 if (strstr($user_email, '@') && strstr($user_email, '.')) {660 if (strpos($user_email, '@') !== false && strpos($user_email, '.') !== false) { 662 661 if (preg_match($chars, $user_email)) { 663 662 return true; … … 1073 1072 $url = str_replace($strip, '', $url); 1074 1073 $url = str_replace(';//', '://', $url); 1075 $url = ( !strstr($url, '://')) ? 'http://'.$url : $url;1074 $url = (strpos($url, '://') === false) ? 'http://'.$url : $url; 1076 1075 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1077 1076 if ( !is_array($protocols) )
Note: See TracChangeset
for help on using the changeset viewer.