Email Obfuscation using antispambot() not working with tribe_get_organizer_email

Home Forums Calendar Products Events Calendar PRO Email Obfuscation using antispambot() not working with tribe_get_organizer_email

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1177230
    Jeff
    Participant

    Hello,
    I was using the code below in my functions.php to obfuscate emails, but just recently it doesn’t seem to work:
    function tribe_947096_obfuscate_organizer_email( $output ) {
    return antispambot( $output );
    }
    add_filter( ‘tribe_get_organizer_email’, ‘tribe_947096_obfuscate_organizer_email’ );

    I found this code from this post:

    Email obfuscation in single event view with Email Address Encoder?

    Tried <?php echo antispambot(‘testemail.com’); ?>
    and that works just fine as a stand alone so I don’t think it’s antispambot that is the problem.

    The code here doesn’t seem to work properly when the filter is active:
    “><?php echo esc_html( tribe_get_organizer_email() ) ?>

    I’ll attach an image of the output, but here is the underlying html code result. This is expected, but this is also what’s displayed to the user:
    &#97;&#108;iso&#110;&#116;a&#109;&#117;cc&#105;&#64;g&#109;&#97;il&#46;c&#111;m

    Here is a link to the page:
    http://a82.dd7.myftpupload.com/event/basic-seminar-ithaca-new-york

    #1177232
    Jeff
    Participant

    Sorry, in the code before I forgot the semicolons. But adding them didn’t help and this code doesn’t work either:
    “><?php echo esc_attr(tribe_get_organizer_email()); ?>

    #1177233
    Jeff
    Participant

    Wait a minute. Did you automatically add the email obfuscation now so that I don’t need the extra code in the functions.php file? It appears as if that’s what happened. I like the feature, just wasn’t aware of it. Am I correct?

    #1177325
    Mathew
    Participant

    Jeff,

    Yes, TEC 4.3 now includes obfuscation of the organizer email addresses, so you can safely remove the custom function. It’s in the /src/template-tags/organizer.php file.

    #1177714
    Nico
    Member

    Hey Jeff,

    Thanks for getting in touch with us, and Mathew thanks for jumping in 🙂

    Indeed the antispambot is by default used by the function, as Mathew indicates above.

    Please let me know if there’s anything else I can help you with,
    Best,
    Nico

    #1189135
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Email Obfuscation using antispambot() not working with tribe_get_organizer_email’ is closed to new replies.