Skip to content

Commit

Permalink
Remove _convert_urlencoded_to_entities() from the get_the_content() c…
Browse files Browse the repository at this point in the history
…allback.

Merges [45937] to the 5.0 branch.

Props vortfu, whyisjake, peterwilsoncc


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@45945 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
whyisjake committed Sep 4, 2019
1 parent ec0d18f commit 8ff16f0
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 100 deletions.
16 changes: 0 additions & 16 deletions src/wp-includes/post-template.php
Expand Up @@ -324,25 +324,9 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
}
}

if ( $preview ) // Preview fix for JavaScript bug with foreign languages.
$output = preg_replace_callback( '/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output );

return $output;
}

/**
* Preview fix for JavaScript bug with foreign languages.
*
* @since 3.1.0
* @access private
*
* @param array $match Match array from preg_replace_callback.
* @return string
*/
function _convert_urlencoded_to_entities( $match ) {
return '&#' . base_convert( $match[1], 16, 10 ) . ';';
}

/**
* Display the post excerpt.
*
Expand Down
24 changes: 0 additions & 24 deletions tests/phpunit/data/formatting/utf-8/entitize.py

This file was deleted.

6 changes: 0 additions & 6 deletions tests/phpunit/data/formatting/utf-8/entitized.txt

This file was deleted.

24 changes: 0 additions & 24 deletions tests/phpunit/data/formatting/utf-8/u-urlencode.py

This file was deleted.

6 changes: 0 additions & 6 deletions tests/phpunit/data/formatting/utf-8/u-urlencoded.txt

This file was deleted.

24 changes: 0 additions & 24 deletions tests/phpunit/tests/formatting/UrlEncodedToEntities.php

This file was deleted.

0 comments on commit 8ff16f0

Please sign in to comment.