Skip to content

Commit

Permalink
Merge tag 'mailto-output' into develop
Browse files Browse the repository at this point in the history
fix mailto output
  • Loading branch information
cbrst committed May 10, 2024
2 parents 9dce084 + 63850ff commit 6e247b1
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/templates/page-mailto-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,9 @@
addressOutput = addressOutput.slice(0, -1);

output.value = `\<script\>
function UnCryptMailto(s) {
var myS = ''; var arrS = s.split(';'); var i = 0;
for (i = 0; i < arrS.length; i++) {
myS += String.fromCharCode(parseInt(arrS[i]));
}
return myS;
}
document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
\<\/script\>`
let UnCryptMailto = (s) => s.split(';').map((c) => String.fromCharCode(parseInt(c))).join('');
document.write('<a href="mailto:' + UnCryptMailto('${addressOutput}') + '">' + UnCryptMailto('${addressOutput}') + '</a>')
\<\/script\>`;
});
</script>

Expand Down

0 comments on commit 6e247b1

Please sign in to comment.