We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9dce084 + 63850ff commit 6e247b1Copy full SHA for 6e247b1
src/templates/page-mailto-generator.php
@@ -45,15 +45,9 @@
45
addressOutput = addressOutput.slice(0, -1);
46
47
output.value = `\<script\>
48
- function UnCryptMailto(s) {
49
- var myS = ''; var arrS = s.split(';'); var i = 0;
50
- for (i = 0; i < arrS.length; i++) {
51
- myS += String.fromCharCode(parseInt(arrS[i]));
52
- }
53
- return myS;
54
55
- document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
56
- \<\/script\>`
+let UnCryptMailto = (s) => s.split(';').map((c) => String.fromCharCode(parseInt(c))).join('');
+document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
+\<\/script\>`;
57
});
58
</script>
59
0 commit comments