From 95ee83dd2b5f188b951ec1fdf0ae142a0ea28112 Mon Sep 17 00:00:00 2001 From: Marco Raddatz Date: Wed, 17 Apr 2024 17:31:22 +0200 Subject: [PATCH] Fix copy and paste from the email --- resources/views/pin.blade.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/views/pin.blade.php b/resources/views/pin.blade.php index 48c2ce8..f3aadc8 100644 --- a/resources/views/pin.blade.php +++ b/resources/views/pin.blade.php @@ -125,6 +125,8 @@ class="bg-transparent cursor-pointer text-light dark:text-gray-200 hover:underli let paste = (event.clipboardData || window.clipboardData).getData('text'); + paste = paste.replace(/\s+/g, ''); + if (isNaN(parseInt(paste)) || paste.length !== pin_length) { return; }