Ticket #16859: square-bracket-esc_url.diff
File square-bracket-esc_url.diff, 548 bytes (added by , 13 years ago) |
---|
-
wp-includes/formatting.php
2548 2548 2549 2549 if ( '' == $url ) 2550 2550 return $url; 2551 2552 // Encode Square brackets into the allowable form 2553 $url = str_replace( array( '[',']' ), array( '%5B','%5D' ), $url ); 2551 2554 $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url); 2552 2555 $strip = array('%0d', '%0a', '%0D', '%0A'); 2553 2556 $url = _deep_replace($strip, $url);