escape newlines

This commit is contained in:
Yannik Schmidt
2020-09-10 02:50:20 +02:00
parent 1c978979f2
commit db0ab374c6

View File

@@ -76,11 +76,11 @@
{% if PGP_KEY %}
<script>
function copyPGP(){
navigator.clipboard.writeText("{{ PGP_KEY }}")
navigator.clipboard.writeText("{{ PGP_KEY | replace('\n', '\\n') }}")
cur = document.getElementById("pgp").innerHTML
document.getElementById("pgp").innerHTML = "Kopiert!"
setTimeout(() => {
document.getElementById("pgp").innerHTML = "PGP Key" }, 2000);
document.getElementById("pgp").innerHTML = "PGP Key" }, 500);
}
</script>
<style>