I don’t have the example available still since I had to fix it on a clients site already. But the link is here: https://www.bsmg.net/contact-us/
The site is using the Enfold theme with an Icon Box module (the sidebar where it says info@). Which is basically a widget with an area for a title, an icon and an option to link the title. The client had configured the title to be linked using this as the URL:
mailto:[email protected]
But when CryptX ran, it would see there was an email address, grab it but for some reason when it decrypted it, it kept the mailto. The script adds mailto whether it’s there or not. So my links ended up having mailto:mailto:[email protected]. So my modification was to add it only if it didn’t already exist.
Regarding my last reply, if you can encode the hash into a number, you would avoid having to use quotes at all. So for example, on https://md5decrypt.net/en/Conversion-tools/ , I could encode:
mailto:[email protected] -> 01101101 01100001 01101001 01101100 01110100 01101111 00111010 01101010 01101111 01101000 01101110 01000000 01100101 01111000 01100001 01101101 01110000 01101100 01100101 00101110 01100011 01101111 01101101
Of course you would have to pad the front with zeroes to ensure it’s 8 bits to a byte because a number will chop those, but you get the idea. Or something a bit more robust like:
function encode2(str) {
return str.replace(/./g, function(c) {
return ('00' + c.charCodeAt(0)).slice(-3);
});
}
function decode2(str) {
return str.replace(/.{3}/g, function(c) {
return String.fromCharCode(c);
});
}
So something like mailto:[email protected] -> 109097105108116111058106111104110064101120097109112108101046099111109
I realize i’m just encoding the email address, you would be encoding the hash instead but it’s just a proof of concept. That help?