From 97dc48485474709d4f3b78d9cdc8937ab9da3c5f Mon Sep 17 00:00:00 2001 From: Cam Spiers Date: Tue, 25 Jun 2013 16:32:51 -0700 Subject: [PATCH] Fix issue where https is not honoured when loading disqus api Summary: Currently if disqus is used and a phame post is loaded over ssl, the disqus api is not loaded over https. This fixes that by honouring the protocol being used by the html document. Test Plan: Open a phame post over https Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D6311 --- src/applications/phame/view/PhamePostView.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/phame/view/PhamePostView.php b/src/applications/phame/view/PhamePostView.php index a6655a6d53..5aab995a31 100644 --- a/src/applications/phame/view/PhamePostView.php +++ b/src/applications/phame/view/PhamePostView.php @@ -220,7 +220,7 @@ final class PhamePostView extends AphrontView { ' var dsq = document.createElement("script");'. ' dsq.type = "text/javascript";'. ' dsq.async = true;'. - ' dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";'. + ' dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";'. '(document.getElementsByTagName("head")[0] ||'. ' document.getElementsByTagName("body")[0]).appendChild(dsq);'. '})();',