From 639e88b0fbc8ee19e301208c401a8a8a5d795b73 Mon Sep 17 00:00:00 2001
From: Tim <roadscape@users.noreply.github.com>
Date: Fri, 9 Sep 2016 11:43:05 -0400
Subject: [PATCH] change relative protocol img src to https #205

---
 shared/HtmlReady.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/shared/HtmlReady.js b/shared/HtmlReady.js
index e5fb7e919..393d3ad25 100644
--- a/shared/HtmlReady.js
+++ b/shared/HtmlReady.js
@@ -74,7 +74,11 @@ function img(state, child) {
     if(url) {
         state.images.add(url)
         if(state.mutate) {
-            const url2 = ipfsPrefix(url)
+            let url2 = ipfsPrefix(url)
+            if(/^\/\//.test(url2)) {
+                // Change relative protocol imgs to https
+                url2 = "https:" + url2
+            }
             if(url2 !== url) {
                 child.setAttribute('src', url2)
             }
-- 
GitLab