Title: Builder code and plugins cause javascrip errors
Last modified: September 18, 2019

---

# Builder code and plugins cause javascrip errors

 *  Resolved [chventures](https://wordpress.org/support/users/chventures/)
 * (@chventures)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/)
 * If you have a builder that generates code for you and activate the plugin to 
   filter plain emails, then the code that is generated has errors.
 * For example, with the Themify builder, the excert of code at the bottom of the
   page is generated. You an see that the emails have been replaced, but the mailto
   anchor is not aware that it is already inside a string. The double quote for 
   the href in the anchor is not escaped.
 * It would be great if the plugin could be contextually aware and escape itself
   appropriately.
 * Thanks
 * ————-
 * var themify_builder_data_80 = [{“element_id”:”9f7b57c”,”cols”:[{“element_id”:”
   05aa1b4″,”grid_class”:”col4-2″,”modules”:[{“mod_name”:”text”,”element_id”:”44f9b6f”,”
   mod_settings”:{“background_image-type”:”image”,”background_repeat”:”repeat”,”
   background_position”:”left-top”,”font_color_type”:”font_color_solid”,”checkbox_padding_apply_all”:”
   1″,”checkbox_margin_apply_all”:”1″,”border-type”:”top”,”font_color_type_h1″:”
   font_color_h1_solid”,”font_color_type_h2″:”font_color_h2_solid”,”font_color_type_h3″:”
   font_color_h3_solid”,”font_color_type_h4″:”font_color_h4_solid”,”font_color_type_h5″:”
   font_color_h5_solid”,”font_color_type_h6″:”font_color_h6_solid”,”checkbox_dropcap_padding_apply_all”:”
   1″,”checkbox_dropcap_margin_apply_all”:”1″,”dropcap_border-type”:”top”,”content_text”:”
   <h3>Officers<\/h3><p>**President<\/strong><br \/>Angela Ingraham<br \/><span 
   class=”wpmt wpml-rtl”><span class=”wpml-sd”>gro.s</span><span class=”wpml-nodis”
   >1568775374</span><span class=”wpml-sd”>gohae</span><span class=”wpml-nodis”>
   1568775374</span><span class=”wpml-sd”>niug@</span><span class=”wpml-nodis”>1568775374
   </span><span class=”wpml-sd”>tnedi</span><span class=”wpml-nodis”>1568775374</
   span><span class=”wpml-sd”>serp</span><span class=”wpml-nodis”>1568775374</span
   ></span>**\”>[<span class=”wpmt ](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/president@guineahogs.org?output_format=md)

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

 *  Plugin Contributor [Ironikus](https://wordpress.org/support/users/ironikus/)
 * (@ironikus)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/#post-11944204)
 * Hey [@chventures](https://wordpress.org/support/users/chventures/) – I just pushed
   a new version, which also addresses your problem.
    What we have done: We included
   soft encoding for script tags. This allows our code to protect emails within 
   script tags only using HTML entities. This way, we can preserve the logic and
   the site continues to work. If this version fixes your issue, feel free to mark
   this task as resolved.
 *  Thread Starter [chventures](https://wordpress.org/support/users/chventures/)
 * (@chventures)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/#post-11946951)
 * That fix worked perfectly! Thanks.
 * 7 hours from problem report to it being fixed! Great job.
 *  Thread Starter [chventures](https://wordpress.org/support/users/chventures/)
 * (@chventures)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/#post-12113108)
 * Since version 3.0.7 this has broken again! I updated to 3.0.9 and the site stopped
   working as the javascript issue mentioned above caused an error and the page 
   didn’t load properly. I then backed up one version at a time until getting back
   to 3.0.6.
 * Any chance you can look at it?
 * Thanks
 *  Plugin Contributor [Ironikus](https://wordpress.org/support/users/ironikus/)
 * (@ironikus)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/#post-12113533)
 * Hey [@chventures](https://wordpress.org/support/users/chventures/) – thank you
   for your message!
    Are you sure it is the same issue? The switch from version
   3.0.6 to 3.0.7 doesn’t include any other changes regarding this logic at all.
   I still checked against the logic and I found out that email addresses within
   javascript tags are still not decoded by the browser if the CDATA tag is not 
   used. I will create a fix for that in the meantime. It would be great if you 
   can share some more details with me on that. Thanks already a lot.
 *  Thread Starter [chventures](https://wordpress.org/support/users/chventures/)
 * (@chventures)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/#post-12151088)
 * Sorry I didn’t reply earlier… Busy. It looks like your version 3.1.0 fixed the
   problem. Thanks again.

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

The topic ‘Builder code and plugins cause javascrip errors’ is closed to new replies.

 * ![](https://ps.w.org/wp-mailto-links/assets/icon-256x256.png?rev=2057013)
 * [WP Mailto Links - Protect Email Addresses](https://wordpress.org/plugins/wp-mailto-links/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mailto-links/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mailto-links/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mailto-links/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mailto-links/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mailto-links/reviews/)

 * 5 replies
 * 1 participant
 * Last reply from: [chventures](https://wordpress.org/support/users/chventures/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/builder-code-and-plugins-cause-javascrip-errors/#post-12151088)
 * Status: resolved