From 436d2a8e42589ab2007d8210a4d4505cfbf3b5d7 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Sun, 1 Mar 2015 09:55:43 +0100 Subject: [PATCH] RSS: Don't add trailing '/' to post image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4888 We automatically added a trailing slash to all non-absolute paths in RSS, including post images. This fix ensures that trailing slashes aren’t added to absolute paths including ‘content/images/‘. --- core/server/controllers/frontend.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/core/server/controllers/frontend.js b/core/server/controllers/frontend.js index c6dca3b118..473b4a282e 100644 --- a/core/server/controllers/frontend.js +++ b/core/server/controllers/frontend.js @@ -561,20 +561,6 @@ frontendControllers = { attributeValue = attributeValue.substr(1); } - // make sure URL has a trailing slash - try { - parsed = url.parse(attributeValue); - - if (parsed.pathname && parsed.pathname.slice(-1) !== '/') { - parsed.pathname += '/'; - - attributeValue = url.format(parsed); - } - } catch (e) { - // if the URL we've built cannot be parsed, fall back to the unprocessed URL - return; - } - attributeValue = baseUrl + attributeValue; el.attr(attributeName, attributeValue); });