Skip to content

Commit

Permalink
Merge pull request #116 from 10up/fix/81
Browse files Browse the repository at this point in the history
Fix: Special Characters Encoding in Tweet body
  • Loading branch information
jeffpaul authored Feb 1, 2021
2 parents 1e45556 + 8b58aed commit a50e8b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function compose_tweet_body( \WP_Post $post ) {
$url = esc_url( $url );
$body_max_length = 275 - strlen( $url ); // 275 instead of 280 because of the space between body and URL and the ellipsis.
$tweet_body = sanitize_text_field( $tweet_body );
$tweet_body = html_entity_decode( $tweet_body, ENT_QUOTES, get_bloginfo( 'charset' ) );
$tweet_body_length = strlen( $tweet_body );
$ellipsis = ''; // Initialize as empty. Will be set if the tweet body is too long.

Expand Down

0 comments on commit a50e8b7

Please sign in to comment.