Skip to content

Commit 6e247b1

Browse files
committed
Merge tag 'mailto-output' into develop
fix mailto output
2 parents 9dce084 + 63850ff commit 6e247b1

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/templates/page-mailto-generator.php

+3-9
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,9 @@
4545
addressOutput = addressOutput.slice(0, -1);
4646

4747
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\>`
48+
let UnCryptMailto = (s) => s.split(';').map((c) => String.fromCharCode(parseInt(c))).join('');
49+
document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
50+
\<\/script\>`;
5751
});
5852
</script>
5953

0 commit comments

Comments
 (0)