From 89a5d07b9461efb39ccf420fd14f2d66587037cf Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 10 Mar 2024 17:26:30 +0100 Subject: [PATCH] shortened paste URL does not appear in email fixes #606 --- CHANGELOG.md | 3 ++- js/privatebin.js | 2 +- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a025365d..bdba3c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.7.2 (not yet released) * CHANGED: "Send" button now labeled "Create" (#946) * FIXED: Add cache control headers also to API calls (#1263) +* FIXED: Shortened paste URL does not appear in email (#606) ## 1.7.1 (2024-02-11) * FIXED: zlib 1.3.1 wasm file reference @@ -28,7 +29,7 @@ ## 1.6.0 (2023-09-11) * ADDED: Translations for Japanese & Arabic -* ADDED: Configuration option to disable Email button (#1164) +* ADDED: Configuration option to disable email button (#1164) * CHANGED: Minimum required PHP version is 7.3, due to upgrading PHPunit (#707) * CHANGED: Removed PHP 5 polyfill for random_bytes() diff --git a/js/privatebin.js b/js/privatebin.js index c3888ad6..d9a4cd2a 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -3965,7 +3965,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { } emailBody += I18n._('Link:'); emailBody += EOL; - emailBody += `${window.location.href}`; + emailBody += $('#pasteurl').attr('href'); // might have been shortened return emailBody; } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 7851fade..e5124394 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -73,7 +73,7 @@ endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index 66e866c1..296d7612 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -51,7 +51,7 @@ endif; ?> - +