Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function encode_backticks_in_esc_url( $cleaned_url, $original_url, $context ) {
- if ( 'display' !== $context ) {
- return $cleaned_url;
- }
- $url = str_replace( '`', '`', $original_url );
- remove_filter( 'clean_url', __FUNCTION__, 10, 3 );
- $cleaned_url = esc_url( $url );
- add_filter( 'clean_url', __FUNCTION__, 10, 3 );
- return $cleaned_url;
- }
- add_filter( 'clean_url', 'encode_backticks_in_esc_url', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement