Title: HTML email stripped when switching from tekst to visual
Last modified: November 20, 2020

---

# HTML email stripped when switching from tekst to visual

 *  Resolved [therealshadowhunter](https://wordpress.org/support/users/therealshadowhunter/)
 * (@therealshadowhunter)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/html-email-stripped-when-switching-from-tekst-to-visual/)
 * Hello,
 * As you know sending HTML emails to render good in both Outlook, GMAIL and others
   requires a lot of trickery. I used BEE Free online to make a simple HTML template
   that has all the code to do the trick.
 * Once I paste this HTML code to the email editor and switch back and forth from
   visual it strippes out (sanitizes) a lot of code replacing it by a paragraph 
   with non breaking space, compromising the whole thing…
 * Is there a way (filter) to turn off this sanitzing or another way of using the
   generated template from BEE fee ([https://beefree.io](https://beefree.io))
 * For example:
 *     ```
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   
       <html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml">
       <head>
       <!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
       <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
       <meta content="width=device-width" name="viewport"/>
       <!--[if !mso]><!-->
       <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
       <!--<![endif]-->
       <title></title>
       <!--[if !mso]><!-->
       <!--<![endif]-->
       <style type="text/css">
       		body {
       			margin: 0;
       			padding: 0;
       		}
       ```
   
 * Becomes:
 *     ```
       <p>&nbsp;</p>
       <!-- [if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
       <p>&nbsp;</p>
       <!-- [if !mso]><!-->
       <p>&nbsp;</p>
       <!--<![endif]-->
       <p>&nbsp;</p>
       <!-- [if !mso]><!-->
       <p>&nbsp;</p>
       <!--<![endif]-->
       <p><style type="text/css">
       		body {
       			margin: 0;
       			padding: 0;
       		}
       ```
   
 * Thank you so much for your help.
    -  This topic was modified 5 years, 5 months ago by [therealshadowhunter](https://wordpress.org/support/users/therealshadowhunter/).

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

 *  Thread Starter [therealshadowhunter](https://wordpress.org/support/users/therealshadowhunter/)
 * (@therealshadowhunter)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/html-email-stripped-when-switching-from-tekst-to-visual/#post-13688770)
 * Well, just now stumbled upon this article:
 * [https://docs.ultimatemember.com/article/1339-customize-email-templates](https://docs.ultimatemember.com/article/1339-customize-email-templates)
 * Gonna give it a try and report back.
 * With best regards,
 * TheRealShadowHunter
 *  Thread Starter [therealshadowhunter](https://wordpress.org/support/users/therealshadowhunter/)
 * (@therealshadowhunter)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/html-email-stripped-when-switching-from-tekst-to-visual/#post-13688886)
 * Hi,
 * Yes, that indeed does the trick, all the HTML is now generated as expected 🙂
 * Thanks for the great documentation.
 * With best regards,
 * TheRealShadowHunter
 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/html-email-stripped-when-switching-from-tekst-to-visual/#post-13697133)
 * Hi [@therealshadowhunter](https://wordpress.org/support/users/therealshadowhunter/)
 * Thanks for letting us know how you resolve the issue.
 * I am closing this thread now.
 * Regards,

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

The topic ‘HTML email stripped when switching from tekst to visual’ is closed to
new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/html-email-stripped-when-switching-from-tekst-to-visual/#post-13697133)
 * Status: resolved