Email Encoder Bundle – Protect Email Address - Version 2.0.9

Version Description

  • Fix: Issue with not properly validated soft-encoded attribute tags on the dom attributes
  • Fix: Issue with not properly validated soft-encoded attributes on special softencoded tags for the content filter
  • Tweak: Optimized performance for soft attribute filtering
  • Tweak: Optimized layout for the foggy.email banner
  • Dev: Added new filter to allow customization of the mailto text: https://ironikus.com/docs/knowledge-base/filter-email-encoder-mailto-text/
Download this release

Release Info

Developer ironikus
Plugin Icon 128x128 Email Encoder Bundle – Protect Email Address
Version 2.0.9
Comparing to
See all releases

Code changes from version 2.0.8 to 2.0.9

core/includes/classes/class-email-encoder-bundle-validate.php CHANGED
@@ -313,11 +313,18 @@ class Email_Encoder_Validate{
313
 
314
  foreach( $soft_attributes as $ident => $regex ){
315
 
316
- $array = array();
317
- preg_match_all( $regex, $content, $array ) ;
 
 
 
 
 
 
 
318
 
319
- foreach( $array as $single ){
320
- $content = str_replace( $single, $this->filter_plain_emails( $single, null, $protection_method, false ), $content );
321
  }
322
 
323
  }
@@ -354,10 +361,18 @@ class Email_Encoder_Validate{
354
  if( strpos( $attr->nodeValue, '@' ) !== FALSE ){
355
  $single_tags = array();
356
  preg_match_all( '/' . $attr->nodeName . '=["\']([^"]*)["\']/i', $content, $single_tags );
357
-
358
- foreach( $single_tags as $single ){
359
- $content = str_replace( $single, $this->filter_plain_emails( $single, null, $protection_method, false ), $content );
 
 
 
 
 
 
 
360
  }
 
361
  }
362
  }
363
  }
@@ -626,6 +641,7 @@ class Email_Encoder_Validate{
626
 
627
  $convert_plain_to_image = (bool) EEB()->settings->get_setting( 'convert_plain_to_image', true, 'filter_body' );
628
  $protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
 
629
 
630
  // get display out of array (result of preg callback)
631
  if ( is_array( $display ) ) {
@@ -633,14 +649,14 @@ class Email_Encoder_Validate{
633
  }
634
 
635
  if( $convert_plain_to_image ){
636
- return '<img src="' . $this->generate_email_image_url( $display ) . '" />';
637
- }
638
-
639
- if( $protection_method !== 'without_javascript' ){
640
- return $this->dynamic_js_email_encoding( $display, $protection_text );
641
  }
642
 
643
- return $this->encode_email_css( $display );
644
 
645
  }
646
 
313
 
314
  foreach( $soft_attributes as $ident => $regex ){
315
 
316
+ $attributes = array();
317
+ preg_match_all( $regex, $content, $attributes );
318
+
319
+ if( is_array( $attributes ) && isset( $attributes[0] ) ){
320
+ foreach( $attributes[0] as $single ){
321
+
322
+ if( empty( $single ) ){
323
+ continue;
324
+ }
325
 
326
+ $content = str_replace( $single, $this->filter_plain_emails( $single, null, $protection_method, false ), $content );
327
+ }
328
  }
329
 
330
  }
361
  if( strpos( $attr->nodeValue, '@' ) !== FALSE ){
362
  $single_tags = array();
363
  preg_match_all( '/' . $attr->nodeName . '=["\']([^"]*)["\']/i', $content, $single_tags );
364
+
365
+ if( is_array( $single_tags ) && isset( $single_tags[0] ) ){
366
+ foreach( $single_tags[0] as $single ){
367
+
368
+ if( empty( $single ) ){
369
+ continue;
370
+ }
371
+
372
+ $content = str_replace( $single, $this->filter_plain_emails( $single, null, $protection_method, false ), $content );
373
+ }
374
  }
375
+
376
  }
377
  }
378
  }
641
 
642
  $convert_plain_to_image = (bool) EEB()->settings->get_setting( 'convert_plain_to_image', true, 'filter_body' );
643
  $protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
644
+ $raw_display = $display;
645
 
646
  // get display out of array (result of preg callback)
647
  if ( is_array( $display ) ) {
649
  }
650
 
651
  if( $convert_plain_to_image ){
652
+ $display = '<img src="' . $this->generate_email_image_url( $display ) . '" />';
653
+ } elseif( $protection_method !== 'without_javascript' ){
654
+ $display = $this->dynamic_js_email_encoding( $display, $protection_text );
655
+ } else {
656
+ $display = $this->encode_email_css( $display );
657
  }
658
 
659
+ return apply_filters( 'eeb/validate/get_protected_display', $display, $raw_display, $protection_method, $protection_text );
660
 
661
  }
662
 
core/includes/partials/widgets/sidebar.php CHANGED
@@ -42,6 +42,7 @@
42
  <div style="font-size: 16px;background: #fff;color: #000;border-radius: 50px;padding: 4px 10px;margin-top: 10px;">hidden@foggy.email</div>
43
  <div style="font-size: 18px;margin: 10px;">forwards to</div>
44
  <div style="font-size: 16px;background: #fff;color: #000;border-radius: 50px;padding: 4px 10px;">my@email.com</div>
 
45
  </div>
46
  </a>
47
  </li>
42
  <div style="font-size: 16px;background: #fff;color: #000;border-radius: 50px;padding: 4px 10px;margin-top: 10px;">hidden@foggy.email</div>
43
  <div style="font-size: 18px;margin: 10px;">forwards to</div>
44
  <div style="font-size: 16px;background: #fff;color: #000;border-radius: 50px;padding: 4px 10px;">my@email.com</div>
45
+ <div style="margin-top: 20px;outline: none;background-color: rgb(60,210,124);font-size: 18px;color: #fff;text-decoration: none;font-weight: 700;padding: 7px 15px;border-radius: 5px;width: auto;">Learn more</div>
46
  </div>
47
  </a>
48
  </li>
email-encoder-bundle.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Email Encoder - Protect Email Addresses
4
- * Version: 2.0.8
5
  * Plugin URI: https://wordpress.org/plugins/email-encoder-bundle/
6
  * Description: Protect email addresses on your site and hide them from spambots. Easy to use & flexible.
7
  * Author: Ironikus
@@ -22,7 +22,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
22
  define( 'EEB_NAME', 'Email Encoder' );
23
 
24
  // Plugin version.
25
- define( 'EEB_VERSION', '2.0.8' );
26
 
27
  // Determines if the plugin is loaded
28
  define( 'EEB_SETUP', true );
1
  <?php
2
  /**
3
  * Plugin Name: Email Encoder - Protect Email Addresses
4
+ * Version: 2.0.9
5
  * Plugin URI: https://wordpress.org/plugins/email-encoder-bundle/
6
  * Description: Protect email addresses on your site and hide them from spambots. Easy to use & flexible.
7
  * Author: Ironikus
22
  define( 'EEB_NAME', 'Email Encoder' );
23
 
24
  // Plugin version.
25
+ define( 'EEB_VERSION', '2.0.9' );
26
 
27
  // Determines if the plugin is loaded
28
  define( 'EEB_SETUP', true );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: ironikus
3
  Tags: anti spam, protect, encode, encrypt, hide, antispam, mailto, spambot, secure, e-mail, email, mail
4
  Requires at least: 4.7
5
  Requires PHP: 5.1
6
- Tested up to: 5.4.2
7
- Stable tag: 2.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -126,6 +126,13 @@ Yes, since version 1.3.0 also special characters are supported.
126
 
127
  == Changelog ==
128
 
 
 
 
 
 
 
 
129
  = 2.0.8 =
130
  * Feature: The shortcode [eeb_protect_content] now supports a new attribute called do_shortcode="yes" which allows you to execute all shortcodes within the given content area
131
  * Tweak: Add new link for the Email Checker (Allows you to check if all of your emails are being encoded)
3
  Tags: anti spam, protect, encode, encrypt, hide, antispam, mailto, spambot, secure, e-mail, email, mail
4
  Requires at least: 4.7
5
  Requires PHP: 5.1
6
+ Tested up to: 5.5.1
7
+ Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
126
 
127
  == Changelog ==
128
 
129
+ = 2.0.9 =
130
+ * Fix: Issue with not properly validated soft-encoded attribute tags on the dom attributes
131
+ * Fix: Issue with not properly validated soft-encoded attributes on special softencoded tags for the content filter
132
+ * Tweak: Optimized performance for soft attribute filtering
133
+ * Tweak: Optimized layout for the foggy.email banner
134
+ * Dev: Added new filter to allow customization of the mailto text: https://ironikus.com/docs/knowledge-base/filter-email-encoder-mailto-text/
135
+
136
  = 2.0.8 =
137
  * Feature: The shortcode [eeb_protect_content] now supports a new attribute called do_shortcode="yes" which allows you to execute all shortcodes within the given content area
138
  * Tweak: Add new link for the Email Checker (Allows you to check if all of your emails are being encoded)