Title: [Plugin: Twitter for WordPress] Escaping HTML entities
Last modified: August 19, 2016

---

# [Plugin: Twitter for WordPress] Escaping HTML entities

 *  [Pneumonic](https://wordpress.org/support/users/pneumonic/)
 * (@pneumonic)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-twitter-for-wordpress-escaping-html-entities/)
 * Not sure if anyone else has had this issue, but I had a post where I used an 
   ampersand – but obviously didn’t use & because it’s twitter and it would look
   idiotic – so when I would check validation, it wouldn’t validate. To fix it I
   did put this on line 71 (which is directly after this line): `$msg = " ".substr(
   strstr($message['description'],': '), 2, strlen($message['description']))." ";`
 *     ```
       $msg = htmlentities($msg);
       ```
   
 * If you are using UTF8 encoding, you can try doing this instead:
 *     ```
       $msg = html_entity_decode($msg);
       $msg = htmlentities($msg);
       ```
   
 * Hope that helps someone.

The topic ‘[Plugin: Twitter for WordPress] Escaping HTML entities’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/twitter-for-wordpress.svg)
 * [Twitter for Wordpress](https://wordpress.org/plugins/twitter-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/twitter-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/twitter-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/twitter-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/twitter-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/twitter-for-wordpress/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Pneumonic](https://wordpress.org/support/users/pneumonic/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/plugin-twitter-for-wordpress-escaping-html-entities/)
 * Status: not resolved