Changeset 45578
- Timestamp:
- 07/01/2019 03:28:21 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r45577 r45578 4203 4203 } 4204 4204 4205 $url = str_replace( ' ', '%20', $url);4205 $url = str_replace( ' ', '%20', ltrim( $url ) ); 4206 4206 $url = preg_replace( '|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\[\]\\x80-\\xff]|i', '', $url ); 4207 4207 -
trunk/tests/phpunit/tests/formatting/EscUrl.php
r43571 r45578 14 14 $this->assertEquals( 'http://example.com/Mr%20%20WordPress', esc_url( 'http://example.com/Mr%20%20WordPress' ) ); 15 15 $this->assertEquals( 'http://example.com/Mr+WordPress', esc_url( 'http://example.com/Mr+WordPress' ) ); 16 $this->assertEquals( 'http://example.com/Mr+WordPress', esc_url( ' http://example.com/Mr+WordPress' ) ); 16 17 17 18 $this->assertEquals( 'http://example.com/?foo=one%20two%20three&bar=four', esc_url( 'http://example.com/?foo=one two three&bar=four' ) );
Note: See TracChangeset
for help on using the changeset viewer.