Ticket #1431: functions-formatting.patch
| File functions-formatting.patch, 1.2 KB (added by Kafkaesqui, 7 years ago) |
|---|
-
functions-formatting.php
41 41 } else { 42 42 $next = true; 43 43 } 44 $curl = preg_replace('/&([^#])(?![a-z1 2]{1,8};)/', '&$1', $curl);44 $curl = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $curl); 45 45 $output .= $curl; 46 46 } 47 47 return $output; … … 98 98 99 99 function wp_specialchars( $text, $quotes = 0 ) { 100 100 // Like htmlspecialchars except don't double-encode HTML entities 101 $text = preg_replace('/&([^#])(?![a-z1 2]{1,8};)/', '&$1', $text);-101 $text = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $text); 102 102 $text = str_replace('<', '<', $text); 103 103 $text = str_replace('>', '>', $text); 104 104 if ( $quotes ) { … … 345 345 $content = preg_replace('/<category>(.+?)<\/category>/','',$content); 346 346 347 347 // Converts lone & characters into & (a.k.a. &) 348 $content = preg_replace('/&([^#])(?![a-z ]{1,8};)/i', '&$1', $content);348 $content = preg_replace('/&([^#])(?![a-z1-4]{1,8};)/i', '&$1', $content); 349 349 350 350 // Fix Word pasting 351 351 $content = strtr($content, $wp_htmltranswinuni);
