Ticket #25021: 25021.negative-lookahead.diff
File 25021.negative-lookahead.diff, 799 bytes (added by , 12 years ago) |
---|
-
src/wp-includes/formatting.php
992 992 */ 993 993 function sanitize_title_with_dashes( $title, $raw_title = '', $context = 'display' ) { 994 994 $title = strip_tags($title); 995 // Preserve escaped octets.996 $title = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '---$1---', $title);997 995 // Remove percent signs that are not part of an octet. 998 $title = str_replace('%', '', $title); 999 // Restore octets. 1000 $title = preg_replace('|---([a-fA-F0-9][a-fA-F0-9])---|', '%$1', $title); 996 $title = preg_replace( '/%(?![a-fA-F0-9][a-fA-F0-9])/', '', $title ); 1001 997 1002 998 if (seems_utf8($title)) { 1003 999 if (function_exists('mb_strtolower')) {