diff --git a/js/privatebin.js b/js/privatebin.js
index 6826da4a..a230ec19 100644
--- a/js/privatebin.js
+++ b/js/privatebin.js
@@ -2763,7 +2763,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
// extract mediaType
const mediaType = attachmentData.substring(5, mediaTypeEnd);
// extract data and convert to binary
- const decodedData = atob(attachmentData.substring(base64Start));
+ const rawData = attachmentData.substring(base64Start);
+ const decodedData = rawData.length > 0 ? atob(rawData) : '';
// Transform into a Blob
const buf = new Uint8Array(decodedData.length);
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index 71da5a66..c06372ee 100644
--- a/tpl/bootstrap.php
+++ b/tpl/bootstrap.php
@@ -72,7 +72,7 @@ endif;
?>
-
+
diff --git a/tpl/page.php b/tpl/page.php
index fd13cc1b..5f16f142 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -50,7 +50,7 @@ endif;
?>
-
+