From 93db220bcc466fd1b463de56107c10b8b3493b7a Mon Sep 17 00:00:00 2001 From: Thomas Apter Date: Wed, 14 Jul 2021 22:29:40 +0100 Subject: [PATCH] Fix image not appearing due to url Images will now appear in news feed - is most likely a single issue fix, will update code if problem persists. --- app/assets/js/scripts/landing.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index d11b1746..3a16ddd6 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -1262,7 +1262,8 @@ function loadNews(){ let regex = /src="(?!http:\/\/|https:\/\/)(.+?)"/g let matches while((matches = regex.exec(content))){ - content = content.replace(`"${matches[1]}"`, `"${newsHost + matches[1]}"`) + // Fix //news issue - Probably only fixes this situation, if problem persists will make more robust. + content = content.replace(`"${matches[1]}"`, `"https:${matches[1]}"`) } let link = el.find('link').text()