WordPress.org

Ready to get started?Download WordPress

Forums

Email Address Encoder
[resolved] Encrypts mailto-link but not link text? (9 posts)

  1. julesibulesi
    Member
    Posted 1 year ago #

    Hey there, Till.

    First things first: Thanks for this plugin! Good work!

    I do seem to have one problem with it, though: when I post something like <a href="mailto:address@mail.me">address@mail.me</a>, only the mailto-part in the a-tag gets encoded, the link text itself remains unaltered. Any idea why that might happen?

    So, in this example
    <a href="mailto:address@mail.me">address@mail.me</a>
    becomes
    <a href="correctly-encripted-mailto-link">address@mail.me</a>

    Cheers!
    Jules

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

  2. Till Krüss
    Member
    Plugin Author

    Posted 1 year ago #

    Hi! That's weird. Do you have any other "encoding" plugins active? Please post me a screenshot of the source code, like this one.

  3. julesibulesi
    Member
    Posted 1 year ago #

    Hm. The only other plugin I have running, that is allowed to alter text, is WP-Typography. I just deactivated it, and everything works fine then. That's weird, however, because the links don't look as if Typography would do anything with them - you can see the page structure with both plugins active here.

    Both plugins disabled.

    WP-Typography disabled.

  4. Till Krüss
    Member
    Plugin Author

    Posted 1 year ago #

  5. julesibulesi
    Member
    Posted 1 year ago #

    Yep, sorry for not providing a link. Silly me.
    Aaand I just noticed that it's quite an old one. I never checked, because it always worked fine for me. Maybe it's time to see if there's something newer around. :-)

  6. Till Krüss
    Member
    Plugin Author

    Posted 1 year ago #

    You can fix this issue, by increasing the priority of the email address encoder filter:

    foreach (array('the_content', 'the_excerpt', 'widget_text', 'comment_text', 'comment_excerpt') as $filter) {
    	remove_filter($filter, 'eae_encode_emails', 1000);
    	add_filter($filter, 'eae_encode_emails', 10000);
    }
  7. julesibulesi
    Member
    Posted 1 year ago #

    Great! Where do I put that, the functions.php?

    I get a feeling I'm severely compromising your weekend. I won't hold it against you if you don't answer until Monday. ;-)

    Thank you so much for the quick support!

  8. Till Krüss
    Member
    Plugin Author

    Posted 1 year ago #

    I might alter the filter priority in the plugin, if more people have this issue, however until then I'd suggest to simply add a MU-plugin to your installation with the code above. Placing it in your theme's functions.php would not persist a theme update.

  9. julesibulesi
    Member
    Posted 1 year ago #

    Oki, I'll do that. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic