Title: BUG: email address html code printed
Last modified: August 30, 2016

---

# BUG: email address html code printed

 *  Resolved [pyramusnl](https://wordpress.org/support/users/pyramusnl/)
 * (@pyramusnl)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/bug-email-address-html-code-printed/)
 * In the most recent update, the plugin accidently strips the html code from the
   email address, resulting in html code printed on a single event page.
    <?php 
   echo esc_html( $email ); ?>
 * File / fix – see screenshot: [https://www.dropbox.com/s/6zenz5s7nomimwp/Screenshot%202015-09-07%2001.15.46.png?dl=0](https://www.dropbox.com/s/6zenz5s7nomimwp/Screenshot%202015-09-07%2001.15.46.png?dl=0)
 * [https://wordpress.org/plugins/the-events-calendar/](https://wordpress.org/plugins/the-events-calendar/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [ggwicz](https://wordpress.org/support/users/ggwicz/)
 * (@ggwicz)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/bug-email-address-html-code-printed/#post-6517893)
 * Hey [@pyramusnl](https://wordpress.org/support/users/pyramusnl/),
 * Thanks for reporting this. I’m curious, does anything improve for you if, instead
   of the `esc_html()` call there altogether, you add code like the following to
   your theme’s _functions.php_ file?
 *     ```
       add_filter( 'tribe_get_organizer_email', 'tribe_support_7394344' );
   
       function tribe_support_7394344( $output ) {
           $output = tribe_get_event_meta( tribe_get_organizer_id( get_the_ID() ), '_OrganizerEmail', true );
           return $output;
       }
       ```
   
 * Let me know if this helps at all!
 * Thanks,
    George
 *  Thread Starter [pyramusnl](https://wordpress.org/support/users/pyramusnl/)
 * (@pyramusnl)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/bug-email-address-html-code-printed/#post-6517906)
 * hey there george,
 * thanks for that! your filter does fix the issue as well. so i will use this instead
   of my own change in the source code to make it easier staying in sync with forthcoming
   updates.
 * i did rewrite the filter a bit more lean:
 *     ```
       function tribe_event_email_link() {
       	return tribe_get_event_meta( tribe_get_organizer_id( get_the_ID() ), '_OrganizerEmail', true );
       }
       add_filter( 'tribe_get_organizer_email', 'tribe_event_email_link' );
       ```
   
 * or was there a specific reason for adding the $output var?
 * thanks,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘BUG: email address html code printed’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [email](https://wordpress.org/support/topic-tag/email/)

 * 2 replies
 * 2 participants
 * Last reply from: [pyramusnl](https://wordpress.org/support/users/pyramusnl/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/bug-email-address-html-code-printed/#post-6517906)
 * Status: resolved