diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php
index 941cd55..f664198 100644
--- a/cfg/conf.sample.php
+++ b/cfg/conf.sample.php
@@ -56,8 +56,8 @@ languageselection = false
; the pastes encryption key
; urlshortener = "https://shortener.example.com/api?link="
-; you can set urlshortenerajax to yes if the shortener returns the url plain text
-; YOU HAVE TO set Control-Allow-Origin header on the other side!
+; you can set urlshortenerajax to true if the shortener returns the url plain text
+; YOU HAVE TO set Control-Allow-Origin header in the link shortener Server!
; https://enable-cors.org/server_apache.html
; https://enable-cors.org/server_nginx.html
; urlshortenerajax = "false"
diff --git a/js/privatebin.js b/js/privatebin.js
index d1bcc44..c7dda7c 100644
--- a/js/privatebin.js
+++ b/js/privatebin.js
@@ -1195,17 +1195,21 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
*/
function sendToShortener()
{
- var url = $shortenButton.data('shortener')+encodeURIComponent($pasteUrl.attr('href'));
+ var url = $shortenButton.data('shortener') + encodeURIComponent($pasteUrl.attr('href'));
if($shortenButton.data('ajax'))
+ {
$.get(url, function(d) {
$pasteUrl.attr(d);
- $pasteUrl.html(d);
+ $pasteUrl.html(d.text());
Helper.selectText($pasteUrl[0]);
$shortenButton.remove();
- })
+ })
+ }
else
+ {
window.location.href = url;
+ }
}
/**
diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php
index c406656..4b4942c 100644
--- a/tpl/bootstrap.php
+++ b/tpl/bootstrap.php
@@ -75,7 +75,7 @@ if ($MARKDOWN):
-
+
diff --git a/tpl/page.php b/tpl/page.php
index 7db65a9..5999e9d 100644
--- a/tpl/page.php
+++ b/tpl/page.php
@@ -54,7 +54,7 @@ if ($QRCODE):
-
+