Version Description
Download this release
Release Info
Developer | ironikus |
Plugin | Email Encoder Bundle – Protect Email Address |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- core/includes/classes/class-email-encoder-bundle-ajax.php +4 -2
- core/includes/classes/class-email-encoder-bundle-run.php +2 -2
- core/includes/classes/class-email-encoder-bundle-validate.php +22 -7
- core/includes/partials/widgets/main.php +5 -0
- core/includes/partials/widgets/sidebar.php +0 -12
- email-encoder-bundle.php +2 -2
- readme.txt +9 -2
core/includes/classes/class-email-encoder-bundle-ajax.php
CHANGED
@@ -88,15 +88,17 @@ class Email_Encoder_Ajax{
|
|
88 |
|
89 |
$email = html_entity_decode( sanitize_email( $_POST['eebEmail'] ) );
|
90 |
$method = sanitize_text_field( $_POST['eebMethod'] );
|
91 |
-
$display =
|
92 |
$custom_class = (string) EEB()->settings->get_setting( 'class_name', true );
|
93 |
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
94 |
|
95 |
if( empty( $display ) ) {
|
96 |
$display = $email;
|
97 |
} else {
|
98 |
-
$display =
|
99 |
}
|
|
|
|
|
100 |
|
101 |
$class_name = ' class="' . esc_attr( $custom_class ) . '"';
|
102 |
$mailto = '<a href="mailto:' . $email . '"'. $class_name . '>' . $display . '</a>';
|
88 |
|
89 |
$email = html_entity_decode( sanitize_email( $_POST['eebEmail'] ) );
|
90 |
$method = sanitize_text_field( $_POST['eebMethod'] );
|
91 |
+
$display = html_entity_decode( $_POST['eebDisplay'] );
|
92 |
$custom_class = (string) EEB()->settings->get_setting( 'class_name', true );
|
93 |
$protection_text = __( EEB()->settings->get_setting( 'protection_text', true ), 'email-encoder-bundle' );
|
94 |
|
95 |
if( empty( $display ) ) {
|
96 |
$display = $email;
|
97 |
} else {
|
98 |
+
$display = wp_kses_post( $display );
|
99 |
}
|
100 |
+
|
101 |
+
$display = sanitize_text_field( $display );
|
102 |
|
103 |
$class_name = ' class="' . esc_attr( $custom_class ) . '"';
|
104 |
$mailto = '<a href="mailto:' . $email . '"'. $class_name . '>' . $display . '</a>';
|
core/includes/classes/class-email-encoder-bundle-run.php
CHANGED
@@ -429,7 +429,7 @@ class Email_Encoder_Run{
|
|
429 |
|
430 |
// mark link as successfullly encoded (for admin users)
|
431 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
432 |
-
$content .=
|
433 |
}
|
434 |
|
435 |
return apply_filters( 'eeb/frontend/shortcode/eeb_protect_content', $content, $atts, $original_content );
|
@@ -499,7 +499,7 @@ class Email_Encoder_Run{
|
|
499 |
|
500 |
// mark link as successfullly encoded (for admin users)
|
501 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
502 |
-
$mailto .=
|
503 |
}
|
504 |
|
505 |
return apply_filters( 'eeb/frontend/shortcode/eeb_mailto', $mailto );
|
429 |
|
430 |
// mark link as successfullly encoded (for admin users)
|
431 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
432 |
+
$content .= EEB()->validate->get_encoded_email_icon();
|
433 |
}
|
434 |
|
435 |
return apply_filters( 'eeb/frontend/shortcode/eeb_protect_content', $content, $atts, $original_content );
|
499 |
|
500 |
// mark link as successfullly encoded (for admin users)
|
501 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
502 |
+
$mailto .= EEB()->validate->get_encoded_email_icon();
|
503 |
}
|
504 |
|
505 |
return apply_filters( 'eeb/frontend/shortcode/eeb_mailto', $mailto );
|
core/includes/classes/class-email-encoder-bundle-validate.php
CHANGED
@@ -237,7 +237,7 @@ class Email_Encoder_Validate{
|
|
237 |
|
238 |
// mark link as successfully encoded (for admin users)
|
239 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
240 |
-
$protected_return .=
|
241 |
}
|
242 |
|
243 |
return $protected_return;
|
@@ -376,7 +376,7 @@ class Email_Encoder_Validate{
|
|
376 |
$no_script_tags = (bool) EEB()->settings->get_setting( 'no_script_tags', true, 'filter_body' );
|
377 |
$no_attribute_validation = (bool) EEB()->settings->get_setting( 'no_attribute_validation', true, 'filter_body' );
|
378 |
|
379 |
-
if( class_exists( 'DOMDocument' ) ){
|
380 |
$dom = new DOMDocument();
|
381 |
@$dom->loadHTML($content);
|
382 |
|
@@ -544,7 +544,7 @@ class Email_Encoder_Validate{
|
|
544 |
$sub_return = str_replace( $email, antispambot( $email ), $input );
|
545 |
|
546 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
547 |
-
$sub_return .=
|
548 |
}
|
549 |
|
550 |
return $sub_return;
|
@@ -557,7 +557,7 @@ class Email_Encoder_Validate{
|
|
557 |
|
558 |
// mark link as successfullly encoded (for admin users)
|
559 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
560 |
-
$inputWithDataAttr .=
|
561 |
}
|
562 |
|
563 |
// remove email from value attribute
|
@@ -587,6 +587,19 @@ class Email_Encoder_Validate{
|
|
587 |
return $encEmail;
|
588 |
}
|
589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
/**
|
591 |
* Create a protected email
|
592 |
*
|
@@ -653,7 +666,7 @@ class Email_Encoder_Validate{
|
|
653 |
|
654 |
// mark link as successfullly encoded (for admin users)
|
655 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
656 |
-
$link .=
|
657 |
}
|
658 |
|
659 |
|
@@ -711,7 +724,7 @@ class Email_Encoder_Validate{
|
|
711 |
|
712 |
// mark link as successfullly encoded (for admin users)
|
713 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
714 |
-
$link .=
|
715 |
}
|
716 |
|
717 |
|
@@ -1022,7 +1035,9 @@ FORM;
|
|
1022 |
|
1023 |
if( empty( $post_id ) ){
|
1024 |
global $post;
|
1025 |
-
|
|
|
|
|
1026 |
} else {
|
1027 |
$post_id = intval( $post_id );
|
1028 |
}
|
237 |
|
238 |
// mark link as successfully encoded (for admin users)
|
239 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
240 |
+
$protected_return .= $this->get_encoded_email_icon();
|
241 |
}
|
242 |
|
243 |
return $protected_return;
|
376 |
$no_script_tags = (bool) EEB()->settings->get_setting( 'no_script_tags', true, 'filter_body' );
|
377 |
$no_attribute_validation = (bool) EEB()->settings->get_setting( 'no_attribute_validation', true, 'filter_body' );
|
378 |
|
379 |
+
if( class_exists( 'DOMDocument' ) && ! empty( $content ) && is_string( $content ) ){
|
380 |
$dom = new DOMDocument();
|
381 |
@$dom->loadHTML($content);
|
382 |
|
544 |
$sub_return = str_replace( $email, antispambot( $email ), $input );
|
545 |
|
546 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
547 |
+
$sub_return .= $this->get_encoded_email_icon();
|
548 |
}
|
549 |
|
550 |
return $sub_return;
|
557 |
|
558 |
// mark link as successfullly encoded (for admin users)
|
559 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
560 |
+
$inputWithDataAttr .= $this->get_encoded_email_icon();
|
561 |
}
|
562 |
|
563 |
// remove email from value attribute
|
587 |
return $encEmail;
|
588 |
}
|
589 |
|
590 |
+
/**
|
591 |
+
* Get the ebcoded email icon
|
592 |
+
*
|
593 |
+
* @param string $email
|
594 |
+
* @return string
|
595 |
+
*/
|
596 |
+
public function get_encoded_email_icon( $text = 'Email encoded successfully!' ){
|
597 |
+
|
598 |
+
$html = '<i class="eeb-encoded dashicons-before dashicons-lock" title="' . __( $text, 'email-encoder-bundle' ) . '"></i>';
|
599 |
+
|
600 |
+
return apply_filters( 'eeb/validate/get_encoded_email_icon', $html, $text );
|
601 |
+
}
|
602 |
+
|
603 |
/**
|
604 |
* Create a protected email
|
605 |
*
|
666 |
|
667 |
// mark link as successfullly encoded (for admin users)
|
668 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
669 |
+
$link .= $this->get_encoded_email_icon();
|
670 |
}
|
671 |
|
672 |
|
724 |
|
725 |
// mark link as successfullly encoded (for admin users)
|
726 |
if ( current_user_can( EEB()->settings->get_admin_cap( 'frontend-display-security-check' ) ) && $show_encoded_check ) {
|
727 |
+
$link .= $this->get_encoded_email_icon( 'Custom attribute encoded successfully!' );
|
728 |
}
|
729 |
|
730 |
|
1035 |
|
1036 |
if( empty( $post_id ) ){
|
1037 |
global $post;
|
1038 |
+
if( ! empty( $post ) ){
|
1039 |
+
$post_id = $post->ID;
|
1040 |
+
}
|
1041 |
} else {
|
1042 |
$post_id = intval( $post_id );
|
1043 |
}
|
core/includes/partials/widgets/main.php
CHANGED
@@ -16,6 +16,11 @@ $advanced_settings = (bool) EEB()->settings->get_setting( 'advanced_settings', t
|
|
16 |
$hide_main_layer = 'style="display:none !important;"';
|
17 |
}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
19 |
//Validate settings value
|
20 |
$main_settings_value = '';
|
21 |
if( isset( $setting['value'] ) ){
|
16 |
$hide_main_layer = 'style="display:none !important;"';
|
17 |
}
|
18 |
|
19 |
+
//Hide foggy email integration
|
20 |
+
if( $setting['title'] === 'Foggy Email API Key' && ! isset( $_GET['displayfoggy'] ) ){
|
21 |
+
continue;
|
22 |
+
}
|
23 |
+
|
24 |
//Validate settings value
|
25 |
$main_settings_value = '';
|
26 |
if( isset( $setting['value'] ) ){
|
core/includes/partials/widgets/sidebar.php
CHANGED
@@ -34,18 +34,6 @@
|
|
34 |
<hr>
|
35 |
<h4>Other plugins and services by Ironikus</h4>
|
36 |
<ul id="other_plugins">
|
37 |
-
<li>
|
38 |
-
<a title="Visit foggy.email" href="https://foggy.email" target="_blank" style="text-decoration: none;">
|
39 |
-
<div style="background:linear-gradient(0deg, rgba(0,189,255,1) 0%, rgba(9,101,253,1) 100%);padding: 20px;text-align: center;color: #fff;border-radius: 5px;">
|
40 |
-
<div style="margin: 0;color: #fff;font-size: 22px;font-weight: 700;">Foggy Email</div>
|
41 |
-
<div style="font-size: 14px;margin-top: 15px;margin-bottom: 20px;">Next-level <strong>email</strong> protection for your WordPress website.</div>
|
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>
|
49 |
<li>
|
50 |
<h4><img src="<?php echo plugins_url('core/includes/assets/img/icon-wp-webhooks.png', EEB_PLUGIN_FILE) ?>"> WP Webhooks</h4>
|
51 |
<p>If you love to automate things, this is for you! WP Webhooks allows you to recieve and send data on your WordPress website from any third party service out there.
|
34 |
<hr>
|
35 |
<h4>Other plugins and services by Ironikus</h4>
|
36 |
<ul id="other_plugins">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
<li>
|
38 |
<h4><img src="<?php echo plugins_url('core/includes/assets/img/icon-wp-webhooks.png', EEB_PLUGIN_FILE) ?>"> WP Webhooks</h4>
|
39 |
<p>If you love to automate things, this is for you! WP Webhooks allows you to recieve and send data on your WordPress website from any third party service out there.
|
email-encoder-bundle.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Email Encoder - Protect Email Addresses
|
4 |
-
* Version: 2.1.
|
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.1.
|
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.1.2
|
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.1.2' );
|
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, phone number, spambot, secure, e-mail, email, mail
|
4 |
Requires at least: 4.7
|
5 |
Requires PHP: 5.1
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.1.
|
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.1.1: April 07, 2021 =
|
130 |
* Tweak: Added svg images to the image exclude list
|
131 |
* Dev: New filter eeb/validate/excluded_image_urls to filter the excluded image list
|
3 |
Tags: anti spam, protect, encode, encrypt, hide, antispam, phone number, spambot, secure, e-mail, email, mail
|
4 |
Requires at least: 4.7
|
5 |
Requires PHP: 5.1
|
6 |
+
Tested up to: 5.8
|
7 |
+
Stable tag: 2.1.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= 2.1.2: July 30, 2021 =
|
130 |
+
* Fix: Prevent notice on undefined post within the global object
|
131 |
+
* Fix: Revalidate Display Text for the frontend encoder form (via [eeb_form] or eeb_form();) to prevent userbased cross site scripting
|
132 |
+
* Fix: Fatal error if the content was not given
|
133 |
+
* Tweak: Centrlalized encoding icon for a better usability
|
134 |
+
* Dev: New filter eeb/validate/get_encoded_email_icon to cusotmize the encoding icon
|
135 |
+
|
136 |
= 2.1.1: April 07, 2021 =
|
137 |
* Tweak: Added svg images to the image exclude list
|
138 |
* Dev: New filter eeb/validate/excluded_image_urls to filter the excluded image list
|