diff --git a/js/privatebin.js b/js/privatebin.js
index b10f2d0d..4e370e91 100644
--- a/js/privatebin.js
+++ b/js/privatebin.js
@@ -2119,6 +2119,10 @@ jQuery.PrivateBin = (function($, RawDeflate) {
if (typeof response === 'string' && response.length > 0) {
const shortUrlMatcher = /https?:\/\/[^\s]+/g;
const shortUrl = (response.match(shortUrlMatcher) || []).filter(function(urlRegExMatch) {
+ if (typeof URL.canParse === 'function') {
+ return URL.canParse(urlRegExMatch);
+ }
+ // polyfill for older browsers (< 120) & node (< 19.9 & < 18.17)
try {
return !!new URL(urlRegExMatch);
} catch (error) {
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index 927891ac..d1a54fcb 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 ba08d2ef..b0b9cc1a 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -51,7 +51,7 @@ endif;
?>
-
+