From 1a67e4982eea47731d52741355663f721bc56756 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 20 Sep 2016 15:43:36 +0100 Subject: [PATCH] change blog regex to look for src's which start with a slash --- services/web/app/coffee/Features/Blog/BlogController.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Blog/BlogController.coffee b/services/web/app/coffee/Features/Blog/BlogController.coffee index 2c39d723f4..0f0d9383c7 100644 --- a/services/web/app/coffee/Features/Blog/BlogController.coffee +++ b/services/web/app/coffee/Features/Blog/BlogController.coffee @@ -28,7 +28,7 @@ module.exports = BlogController = try data = JSON.parse(data) if settings.cdn?.web?.host? - data?.content = data?.content?.replace(/src="([^"\:]+)"/g, "src='#{settings.cdn?.web?.host}$1'"); + data?.content = data?.content?.replace(/src="(\/[^"]+)"/g, "src='#{settings.cdn?.web?.host}$1'"); catch err logger.err err:err, data:data, "error parsing data from data" res.render "blog/blog_holder", data