From cd9bd91ab2a453b1c92e1b5fc2a63f91d4660404 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Mon, 24 Feb 2014 15:10:27 -0500 Subject: [PATCH] fixes double hashes in share links --- public/src/forum/topic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 33b6fbc4a2..8ebd8342d8 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -484,7 +484,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { $('#post-container').on('shown.bs.dropdown', '.share-dropdown', function() { var pid = $(this).parents('.post-row').attr('data-pid'); - $('#post_' + pid + '_link').val(window.location.href + "#" + pid); + $('#post_' + pid + '_link').val(window.location.protocol + '//' + window.location.host + window.location.pathname + '#' + pid); // without the setTimeout can't select the text in the input setTimeout(function() { $('#post_' + pid + '_link').putCursorAtEnd().select();