WordPress.org

Ready to get started?Download WordPress

Forums

Email Encoder Bundle - Protect Email Address
[resolved] Version 0.7 always shows the "successfully encoded" message (7 posts)

  1. SaschaN
    Member
    Posted 1 year ago #

    Hi!

    After updating to version 0.7 I always have the "successfully encoded" message under each encoded email address in my pages and posts. This message is also visible when currently not logged-in as an admin, so every visitor of the page will see this.

    As a workaround I changed the "get_html_checked" function as follows:

    function get_html_checked($content) {
        if(current_user_can('manage_options')) {
            return $content
                . '<a href="javascript:;" class="encoded-check"'
                . ' title="' . __('Successfully Encoded (this is a check and only visible when logged in as admin)', $this->domain) . '">'
                . '<img class="encoded-check-icon" src="' . plugins_url('images/icon-email-encoder-bundle.png', __FILE__)
                . '" alt="' . __('Encoded', $this->domain) . '" />'
                . __('Succesfully Encoded', $this->domain) . '</a>';
        } else {
            return $content;
        }
    }

    Best regards
    Sascha

    http://wordpress.org/extend/plugins/email-encoder-bundle/

  2. freelancephp
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Sascha,
    I tested it on multiple sites and it does not show the "succesfully encoded" message on the site when I am logged out.

    The check you implemented is already done earlier on the "wp" action:
    $this->logged_in = (bool) ($user_ID && current_user_can('level_10'));

    Gr, Victor

  3. freelancephp
    Member
    Plugin Author

    Posted 1 year ago #

    Sascha, I found the bug. It does not check when "Html Encode" method is being used. I will fix this, hopefully release it within a few hours.

  4. SaschaN
    Member
    Posted 1 year ago #

    Hello Victor,

    I guess I found it: I had the "HTML encoding" method selected. Strange, I'm sure I'd selected "Javascript ASCII" after the first install of the plugin. With "Javascript ASCII" it's working as expected.

    Nevertheless: Shouldn't the "HTML encoding" hide the "encoded" message either?

    Best regards
    Sascha

  5. SaschaN
    Member
    Posted 1 year ago #

    Seems that we both found where the bug is. Was on the phone for 20 minutes until I wrote my last sentence and pressed "post". So I didn't notice that you already found it.

  6. freelancephp
    Member
    Plugin Author

    Posted 1 year ago #

    Always good to have a second opinion ;)

    Indeed, it should work for HTML Encoding as well. Fixed it, with some other issues in version 0.71.

    Note: I made an extra option in the admin panel to show this message. You have to enable this option first (it's off by default).

    Thanks for your help Sascha!

    Gr, Victor

  7. SaschaN
    Member
    Posted 1 year ago #

    Never mind!

    Thanks for this nice plugin!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic