Version Description
- Fixed skip responsive images containing @
Download this release
Release Info
Developer | freelancephp |
Plugin | Email Encoder Bundle – Protect Email Address |
Version | 1.4.4 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.4.4
- LICENSE +0 -20
- README.md +0 -6
- email-encoder-bundle.php +11 -11
- includes/class-eeb-admin.php +18 -3
- includes/class-eeb-site.php +20 -9
- js/{src/email-encoder-bundle-admin.js → email-encoder-bundle-admin.js} +0 -0
- js/{src/email-encoder-bundle.js → email-encoder-bundle.js} +0 -0
- js/email-encoder-bundle.min.js +0 -2
- js/src/.htaccess +0 -1
- readme.txt +8 -3
LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
The MIT License (MIT)
|
2 |
-
|
3 |
-
Copyright (c) 2014 Victor Villaverde Laan
|
4 |
-
|
5 |
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6 |
-
this software and associated documentation files (the "Software"), to deal in
|
7 |
-
the Software without restriction, including without limitation the rights to
|
8 |
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9 |
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
10 |
-
subject to the following conditions:
|
11 |
-
|
12 |
-
The above copyright notice and this permission notice shall be included in all
|
13 |
-
copies or substantial portions of the Software.
|
14 |
-
|
15 |
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17 |
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18 |
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19 |
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20 |
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
Email Encoder Bundle
|
2 |
-
====================
|
3 |
-
|
4 |
-
Sharing the code of this WordPress plugin. Now everybody can contribute their improvements, bug fixes and new features.
|
5 |
-
|
6 |
-
See http://wordpress.org/plugins/email-encoder-bundle/
|
|
|
|
|
|
|
|
|
|
|
|
email-encoder-bundle.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<?php defined('ABSPATH') OR die('No direct access.');
|
2 |
/*
|
3 |
-
Plugin Name:
|
4 |
-
Plugin URI:
|
5 |
-
Description:
|
6 |
-
Author:
|
7 |
-
Version:
|
8 |
-
Author URI:
|
9 |
-
License:
|
10 |
-
Text Domain:
|
11 |
-
Domain Path:
|
12 |
*/
|
13 |
|
14 |
// constants
|
15 |
-
if (!defined('EMAIL_ENCODER_BUNDLE_VERSION')) { define('EMAIL_ENCODER_BUNDLE_VERSION', '1.4.
|
16 |
-
if (!defined('EMAIL_ENCODER_BUNDLE_FILE')) { define('EMAIL_ENCODER_BUNDLE_FILE', __FILE__); }
|
17 |
if (!defined('EMAIL_ENCODER_BUNDLE_KEY')) { define('EMAIL_ENCODER_BUNDLE_KEY', 'WP_Email_Encoder_Bundle'); }
|
18 |
if (!defined('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME')) { define('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME', 'WP_Email_Encoder_Bundle_options'); }
|
19 |
if (!defined('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE')) { define('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE', 'email-encoder-bundle-settings'); }
|
1 |
<?php defined('ABSPATH') OR die('No direct access.');
|
2 |
/*
|
3 |
+
Plugin Name: Email Encoder Bundle - Protect Email Address
|
4 |
+
Plugin URI: http://www.freelancephp.net/email-encoder-php-class-wp-plugin/
|
5 |
+
Description: Protect email addresses on your site and hide them from spambots by using an encoding method. Easy to use, flexible .
|
6 |
+
Author: Victor Villaverde Laan
|
7 |
+
Version: 1.4.4
|
8 |
+
Author URI: http://www.freelancephp.net
|
9 |
+
License: Dual licensed under the MIT and GPL licenses
|
10 |
+
Text Domain: email-encoder-bundle
|
11 |
+
Domain Path: /languages
|
12 |
*/
|
13 |
|
14 |
// constants
|
15 |
+
if (!defined('EMAIL_ENCODER_BUNDLE_VERSION')) { define('EMAIL_ENCODER_BUNDLE_VERSION', '1.4.4'); }
|
16 |
+
if (!defined('EMAIL_ENCODER_BUNDLE_FILE')) { define('EMAIL_ENCODER_BUNDLE_FILE', defined('TEST_EEB_PLUGIN_FILE') ? TEST_EEB_PLUGIN_FILE : __FILE__); }
|
17 |
if (!defined('EMAIL_ENCODER_BUNDLE_KEY')) { define('EMAIL_ENCODER_BUNDLE_KEY', 'WP_Email_Encoder_Bundle'); }
|
18 |
if (!defined('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME')) { define('EMAIL_ENCODER_BUNDLE_OPTIONS_NAME', 'WP_Email_Encoder_Bundle_options'); }
|
19 |
if (!defined('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE')) { define('EMAIL_ENCODER_BUNDLE_ADMIN_PAGE', 'email-encoder-bundle-settings'); }
|
includes/class-eeb-admin.php
CHANGED
@@ -232,9 +232,8 @@ abstract class Eeb_Admin {
|
|
232 |
wp_enqueue_script('dashboard');
|
233 |
|
234 |
// add script for ajax encoder
|
235 |
-
|
236 |
-
|
237 |
-
wp_enqueue_script('email_encoder', plugins_url('js/email-encoder-bundle.min.js', EMAIL_ENCODER_BUNDLE_FILE), array('jquery'), EMAIL_ENCODER_BUNDLE_VERSION);
|
238 |
|
239 |
// add help tabs
|
240 |
$this->add_help_tabs();
|
@@ -253,6 +252,7 @@ abstract class Eeb_Admin {
|
|
253 |
add_meta_box('rss_settings', __('RSS Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('rss_settings'));
|
254 |
add_meta_box('admin_settings', __('Admin Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('admin_settings'));
|
255 |
add_meta_box('encode_form', __('Email Encoder Form', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('encode_form'));
|
|
|
256 |
add_meta_box('this_plugin', __('Support', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'side', 'core', array('this_plugin'));
|
257 |
add_meta_box('other_plugins', __('Other Plugins', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'side', 'core', array('other_plugins'));
|
258 |
}
|
@@ -517,6 +517,21 @@ abstract class Eeb_Admin {
|
|
517 |
</p>
|
518 |
<br class="clear" />
|
519 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
<?php
|
521 |
} else if ($key === 'this_plugin') {
|
522 |
?>
|
232 |
wp_enqueue_script('dashboard');
|
233 |
|
234 |
// add script for ajax encoder
|
235 |
+
wp_enqueue_script('email_encoder', plugins_url('js/email-encoder-bundle.js', EMAIL_ENCODER_BUNDLE_FILE), array('jquery'), EMAIL_ENCODER_BUNDLE_VERSION);
|
236 |
+
wp_enqueue_script('email_encoder_admin', plugins_url('js/email-encoder-bundle-admin.js', EMAIL_ENCODER_BUNDLE_FILE), array('jquery'), EMAIL_ENCODER_BUNDLE_VERSION);
|
|
|
237 |
|
238 |
// add help tabs
|
239 |
$this->add_help_tabs();
|
252 |
add_meta_box('rss_settings', __('RSS Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('rss_settings'));
|
253 |
add_meta_box('admin_settings', __('Admin Settings', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('admin_settings'));
|
254 |
add_meta_box('encode_form', __('Email Encoder Form', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('encode_form'));
|
255 |
+
add_meta_box('future', __('Future, end of support...', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'normal', 'core', array('future'));
|
256 |
add_meta_box('this_plugin', __('Support', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'side', 'core', array('this_plugin'));
|
257 |
add_meta_box('other_plugins', __('Other Plugins', 'email-encoder-bundle'), array($this, 'show_meta_box_content'), null, 'side', 'core', array('other_plugins'));
|
258 |
}
|
517 |
</p>
|
518 |
<br class="clear" />
|
519 |
|
520 |
+
<?php
|
521 |
+
} else if ($key === 'future') {
|
522 |
+
?>
|
523 |
+
|
524 |
+
<p>The support and further development of <strong>Email Encoder Bundle</strong> will soon come to an end and will continue as <strong>WP Mailto Links</strong>.</p>
|
525 |
+
|
526 |
+
<p>Therefore I would like to know, why do you like this plugin? Which features or settings do you use?
|
527 |
+
<br>And what features are you missing in the WP Mailto Links plugin to make the transfer?
|
528 |
+
</p>
|
529 |
+
|
530 |
+
<p>Please share your thoughts on <a href="https://wordpress.org/support/topic/why-prefer-email-encoder-bundle-over-wp-mailto-links?replies=1" target="_blank">this page</a>.
|
531 |
+
</p>
|
532 |
+
|
533 |
+
<p><a class="button button-secondary" href="javascript:;" onclick="jQuery('#future-hide').click();">Hide this message</a></p>
|
534 |
+
|
535 |
<?php
|
536 |
} else if ($key === 'this_plugin') {
|
537 |
?>
|
includes/class-eeb-site.php
CHANGED
@@ -29,8 +29,8 @@ final class Eeb_Site extends Eeb_Admin {
|
|
29 |
* @var array Regular expresssions
|
30 |
*/
|
31 |
private $regexp_patterns = array(
|
32 |
-
'mailto' => '/<a([^<>]*?)href=["\']mailto:(
|
33 |
-
'email' => '/
|
34 |
'input' => '/<input([^>]*)value=["\'][\s+]*([A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z.]{2,6})[\s+]*["\']([^>]*)>/is',
|
35 |
'class' => '/class=["\'](.*?)["\']/i',
|
36 |
);
|
@@ -241,12 +241,24 @@ final class Eeb_Site extends Eeb_Admin {
|
|
241 |
* @return string
|
242 |
*/
|
243 |
public function callback_encode_email($match) {
|
244 |
-
if (count($match) <
|
245 |
-
$
|
246 |
-
|
247 |
-
$encoded = $this->encode_email($match[2]);
|
248 |
} else {
|
249 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
}
|
251 |
|
252 |
// workaround for double encoding bug when auto-protect mailto is enabled and method is enc_html
|
@@ -285,8 +297,7 @@ final class Eeb_Site extends Eeb_Admin {
|
|
285 |
*/
|
286 |
public function shortcode_email_encoder_form() {
|
287 |
// add style and script for ajax encoder
|
288 |
-
|
289 |
-
wp_enqueue_script('email_encoder', plugins_url('js/email-encoder-bundle.min.js', EMAIL_ENCODER_BUNDLE_FILE), array('jquery'), EMAIL_ENCODER_BUNDLE_VERSION);
|
290 |
|
291 |
return $this->get_encoder_form();
|
292 |
}
|
29 |
* @var array Regular expresssions
|
30 |
*/
|
31 |
private $regexp_patterns = array(
|
32 |
+
'mailto' => '/<a([^<>]*?)href=["\']mailto:([A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9](\.[A-Z.]{2,6}))["\'](.*?)>(.*?)<\/a[\s+]*>/is',
|
33 |
+
'email' => '/[A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9](\.[A-Z.]{2,6})/is',
|
34 |
'input' => '/<input([^>]*)value=["\'][\s+]*([A-Z0-9._-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z.]{2,6})[\s+]*["\']([^>]*)>/is',
|
35 |
'class' => '/class=["\'](.*?)["\']/i',
|
36 |
);
|
241 |
* @return string
|
242 |
*/
|
243 |
public function callback_encode_email($match) {
|
244 |
+
if (count($match) < 4) {
|
245 |
+
$email = $match[0];
|
246 |
+
$extention = strtolower($match[1]);
|
|
|
247 |
} else {
|
248 |
+
$email = $match[2];
|
249 |
+
$extention = strtolower($match[3]);
|
250 |
+
}
|
251 |
+
|
252 |
+
// workaround to skip responsive image names containing @
|
253 |
+
$excludedList = array('.jpg', '.jpeg', 'png', 'gif');
|
254 |
+
if (in_array($extention, $excludedList)) {
|
255 |
+
return $match[0];
|
256 |
+
}
|
257 |
+
|
258 |
+
if (count($match) < 4) {
|
259 |
+
$encoded = $this->encode_email($email);
|
260 |
+
} else {
|
261 |
+
$encoded = $this->encode_email($email, $match[5], $match[1] . ' ' . $match[4]);
|
262 |
}
|
263 |
|
264 |
// workaround for double encoding bug when auto-protect mailto is enabled and method is enc_html
|
297 |
*/
|
298 |
public function shortcode_email_encoder_form() {
|
299 |
// add style and script for ajax encoder
|
300 |
+
wp_enqueue_script('email_encoder', plugins_url('js/email-encoder-bundle.js', EMAIL_ENCODER_BUNDLE_FILE), array('jquery'), EMAIL_ENCODER_BUNDLE_VERSION);
|
|
|
301 |
|
302 |
return $this->get_encoder_form();
|
303 |
}
|
js/{src/email-encoder-bundle-admin.js → email-encoder-bundle-admin.js}
RENAMED
File without changes
|
js/{src/email-encoder-bundle.js → email-encoder-bundle.js}
RENAMED
File without changes
|
js/email-encoder-bundle.min.js
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
/* Email Encoder Bundle */
|
2 |
-
jQuery(function(e){"use strict";var t=e(".eeb-form");var n=t.find("#eeb-email");var r=t.find("#eeb-display");var i;var s=function(){if(!n.val()){return}t.find("#eeb-encoded-output").val("");e.post("",{eebActionEncodeEmail:true,eebEmail:n.val(),eebDisplay:r.val()||n.val(),eebMethod:t.find("#eeb-encode-method").val()},function(e){t.find("#eeb-encoded-output").val(e);t.find(".eeb-output").fadeIn()})};t.find(".eeb-output").hide();n.keyup(function(){var e=n.val();var t=r.val();if(!t||t===i){r.val(e)}i=e});t.find("#eeb-email, #eeb-display").keyup(function(){if(r.val().length>0){t.find(".eeb-example").html('<a href="mailto:'+n.val()+'">'+r.val()+"</a>").parents("tr").fadeIn()}else{t.find(".eeb-example").parents("tr").fadeOut()}t.find(".eeb-output").fadeOut();t.find("#eeb-encoded-output").val("")}).keyup();t.find("#eeb-encode-method").bind("change keyup",function(){s()});t.find("#eeb-ajax-encode").click(function(){s()})});jQuery(function(e){"use strict";var t=e("#encode_emails");e("#setting-error-settings_updated").click(function(){e(this).hide()});e("#encode_mailtos").change(function(){var n=e(this).prop("checked");t.attr("disabled",!n);if(!n){t.attr("checked",false)}t.change()}).change();t.change(function(){e(".notice-form-field-bug")[t.prop("checked")?"fadeIn":"fadeOut"]()});e(".eeb-form table").addClass("form-table");e(".eeb-help-link").click(function(t){e("#contextual-help-link").click();t.preventDefault()});e(".wrap form").submit(function(){e('*[type="checkbox"]:not(:checked)').css({visibility:"hidden"}).attr({value:"0",checked:"checked"})});e('*[type="submit"]').attr("disabled",false).removeClass("submit")})
|
|
|
|
js/src/.htaccess
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
deny from all
|
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: freelancephp
|
3 |
Tags: email address, protect, antispam, mailto, spambot, secure, e-mail, email, mail, obfuscate, encode, encoder, encrypt, hide, bot, crawl, spider, robots, spam, protection, harvest, harvesting, security
|
4 |
Requires at least: 3.6.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.4.
|
7 |
|
8 |
Encode mailto links, email addresses, phone numbers and any text to hide them from (spam)bots. Mailto links will be protected automatically.
|
9 |
|
@@ -16,7 +16,6 @@ Encode mailto links, email addresses, phone numbers and any text to hide them fr
|
|
16 |
* Protect phone numbers (or any text or html)
|
17 |
* Also supports special chars, like é, â, ö, Chinese characters etcetera
|
18 |
* Also protect your RSS feeds
|
19 |
-
|
20 |
* Use shortcodes, template functions, action and filter hooks
|
21 |
* Use the Encoder Form to manually create encoded scripts
|
22 |
|
@@ -125,6 +124,12 @@ It's possible to filter all widgets by using the [Widget Logic Plugin](https://w
|
|
125 |
|
126 |
== Changelog ==
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
= 1.4.2 =
|
129 |
* Fixed potential xss vulnerability
|
130 |
|
2 |
Contributors: freelancephp
|
3 |
Tags: email address, protect, antispam, mailto, spambot, secure, e-mail, email, mail, obfuscate, encode, encoder, encrypt, hide, bot, crawl, spider, robots, spam, protection, harvest, harvesting, security
|
4 |
Requires at least: 3.6.0
|
5 |
+
Tested up to: 4.5.2
|
6 |
+
Stable tag: 1.4.4
|
7 |
|
8 |
Encode mailto links, email addresses, phone numbers and any text to hide them from (spam)bots. Mailto links will be protected automatically.
|
9 |
|
16 |
* Protect phone numbers (or any text or html)
|
17 |
* Also supports special chars, like é, â, ö, Chinese characters etcetera
|
18 |
* Also protect your RSS feeds
|
|
|
19 |
* Use shortcodes, template functions, action and filter hooks
|
20 |
* Use the Encoder Form to manually create encoded scripts
|
21 |
|
124 |
|
125 |
== Changelog ==
|
126 |
|
127 |
+
= 1.4.4 =
|
128 |
+
* Fixed skip responsive images containing @
|
129 |
+
|
130 |
+
= 1.4.3 =
|
131 |
+
* Changed content
|
132 |
+
|
133 |
= 1.4.2 =
|
134 |
* Fixed potential xss vulnerability
|
135 |
|