diff --git a/js/package-lock.json b/js/package-lock.json
index ed57b711..ead24582 100644
--- a/js/package-lock.json
+++ b/js/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "privatebin",
- "version": "1.6.2",
+ "version": "1.7.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "privatebin",
- "version": "1.6.2",
+ "version": "1.7.3",
"license": "zlib-acknowledgement",
"devDependencies": {
"@peculiar/webcrypto": "^1.1.1",
diff --git a/js/privatebin.js b/js/privatebin.js
index 65b97169..33a4494e 100644
--- a/js/privatebin.js
+++ b/js/privatebin.js
@@ -3831,7 +3831,8 @@ jQuery.PrivateBin = (function($, RawDeflate) {
*/
function downloadText()
{
- var filename='paste-' + Model.getPasteId() + '.txt';
+ var fileFormat = PasteViewer.getFormat() === 'markdown' ? '.md' : '.txt';
+ var filename='paste-' + Model.getPasteId() + fileFormat;
var text = PasteViewer.getText();
var element = document.createElement('a');
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index becc3e87..c8df9e2c 100644
--- a/tpl/bootstrap.php
+++ b/tpl/bootstrap.php
@@ -73,7 +73,7 @@ endif;
?>
-
+
diff --git a/tpl/bootstrap5.php b/tpl/bootstrap5.php
index 28ea4ad9..951a518b 100644
--- a/tpl/bootstrap5.php
+++ b/tpl/bootstrap5.php
@@ -57,7 +57,7 @@ endif;
?>
-
+
diff --git a/tpl/page.php b/tpl/page.php
index 666f0b55..f5b4f6fb 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -51,7 +51,7 @@ endif;
?>
-
+