Title: Double encoding?
Last modified: August 21, 2016

---

# Double encoding?

 *  Resolved [Ilia Tyker](https://wordpress.org/support/users/joanne123/)
 * (@joanne123)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/double-encoding/)
 * When we set both “Protect mailto links” and “protect plain email addresses” we
   occasionally see garbage where the email link should be.
    When this happens, 
   looking at the source shows javascript within javascript, suggesting that the
   random characters generated might have looked like an email address and might
   have got encoded again.
 * Refreshing the page gets rid of the problem.
 * Removing “protect plain email addresses” seems to stop the problem, but we’d 
   like to have both.
 * [https://wordpress.org/plugins/email-encoder-bundle/](https://wordpress.org/plugins/email-encoder-bundle/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Pi Zi](https://wordpress.org/support/users/freelancephp/)
 * (@freelancephp)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/double-encoding/#post-5026192)
 * Hi josie, what’s the original html before being messed up by the plugin?
 *  [webmystery](https://wordpress.org/support/users/webmystery/)
 * (@webmystery)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/double-encoding/#post-5026316)
 * I occasionally see the same thing – this is one of the sites where it happens:
   [http://coalshedstudios.com/](http://coalshedstudios.com/). I thought it might
   be a race condition – occasionally when landing on a page I’ll see the javascript
   instead of the encoded email.
 * This is what I see in dev tools when it is working correctly. (Of course now 
   that I’m trying to reproduce the problem I can’t. Maybe it doesn’t happen once
   the page is cached. ):
 *     ```
       <script type="text/javascript">(function(){var ml="r@lginp =wct>/s-ke<u.aho:jm\"f",mi="BE7:2E>>8KJE42;G?245@K7F0AL8KJE42;GH;I9E2@C613JE42D:GJK7<;I9E2@C613JE42D:GJB=E<",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.write(o);}());</script>
       <a class="mailto-link" href="mailto:foo@gmail.com">foo@gmail.com</a>
       <br>
       <noscript>*protected email*</noscript>
       ```
   
 * I’m using chrome on an old intel imac. None of the people I’ve created these 
   sites for have mentioned this issue, so it apparently isn’t too prevalent
 *  Thread Starter [Ilia Tyker](https://wordpress.org/support/users/joanne123/)
 * (@joanne123)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/double-encoding/#post-5026317)
 * The html as displayed by the wordpress editor would be something like:
 * send an email to Joe Blow ([joe@myhost.com](https://wordpress.org/support/topic/double-encoding/joe@myhost.com?output_format=md))
 *  [webmystery](https://wordpress.org/support/users/webmystery/)
 * (@webmystery)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/double-encoding/#post-5026326)
 * Here we go — happened again. Here’s what the returned code looks like (with phone
   number edited to protect the innocent)
 *     ```
       <p>415.123.4567<br>
       415.234.5678<br>
       <script type="text/javascript">(function(){var ml="/kifp <script type="text/javascript">(function(){var ml="r:t m@fal/s-in>\"ckeho=.<",mi="G73@87::E?47<82D;8<=A?3C0B6E?47<82D1752D=:FCB@?3>752D=:FCB@G97>",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.write(o);}());</script><noscript>*protected email*</noscript>:=rm>l<x\"-",mi="f65?e6;;ahc62e89ie2:1h5=b>3AHC62E89@=>BCG4B>;;769E<!--?9CH5D=-->BCG4B>;;769E<!--?9CF06D",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.write(o);}());</script--><br>
       <noscript>*protected email*</noscript>
       </x\"-",mi="f65?e6;;ahc62e89ie2:1h5=b></p>
       ```
   
 * And this is what is displayed in screen instead of an email address:
    :=rm>l3AHC62E89@
   =>BCG4B>;;769EBCG4B>;;769E
 *  [webmystery](https://wordpress.org/support/users/webmystery/)
 * (@webmystery)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/double-encoding/#post-5026331)
 * Interesting – only the first email in a set of posts on this page appearing garbled
   this morning:
    [http://coalshedstudios.com/artists/](http://coalshedstudios.com/artists/)
 * Here’s the html of the munged one:
 *     ```
       <script type="text/javascript">(function(){var ml="tr-\"moc=>ln:< <script type="text/javascript">(function(){var ml="-\":fzolkm<>nr@t/eca =i.sh",mi="9BCA6BGGD18BE6>506E;71CH<@3D18BE6>52BH=3GF@E41C:BH=3GF@E49?B:",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.write(o);}());</script><noscript>*protected email*</noscript>/k",mi="<>=69>BB734>E90529E:H3=?1DA734>E905;4>6HD:FED4>1B?>99@156HD04>E9C6543=84>6HD:FED4>1B?>99@156HD04>E9C654<g>8",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charat(mi.charcodeat(j)-48);}document.write(o);}());< script=""><br>
       <noscript>*protected email*</noscript>
       </l;j++){o+=ml.charat(mi.charcodeat(j)-48);}document.write(o);}());<></g>
       ```
   
 * and the correctly appearing one right next to it:
 *     ```
       <script type="text/javascript">(function(){var ml="aobrsm@=k 7h/.>fve5:\"-ctnxli<g",mi="L09FJ0447D50KJG1EJKH8D9;3A?7D50KJG1CI0@21H:B6M50KJ=F15D9>I0@21H:B6M50KJ=F15L<0>",o="";for(var j=0,l=mi.length;j<l;j++){o+=ml.charAt(mi.charCodeAt(j)-48);}document.write(o);}());</script><a class="mailto-link" href="mailto:xavbon75@gmail.com">xavbon75@gmail.com</a><br>
       <noscript>*protected email*</noscript>
       ```
   
 * Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Double encoding?’ is closed to new replies.

 * ![](https://ps.w.org/email-encoder-bundle/assets/icon-256x256.png?rev=2056506)
 * [Email Encoder - Protect Email Addresses and Phone Numbers](https://wordpress.org/plugins/email-encoder-bundle/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-encoder-bundle/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-encoder-bundle/)
 * [Active Topics](https://wordpress.org/support/plugin/email-encoder-bundle/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-encoder-bundle/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-encoder-bundle/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [webmystery](https://wordpress.org/support/users/webmystery/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/double-encoding/#post-5026331)
 * Status: resolved