From b48571ceb8fc052937f0a3d1d92636a7abcac68d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 13 Aug 2014 16:03:33 -0400 Subject: [PATCH 1/2] fixed #1988 --- src/middleware/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/middleware/index.js b/src/middleware/index.js index 9fbaa0f97a..a90ea6d9a1 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -41,7 +41,7 @@ function routeThemeScreenshots(app, themes) { (function(id, path) { fs.exists(path, function(exists) { if (exists) { - app.get('/css/previews/' + id, function(req, res) { + app.get(relativePath + '/css/previews/' + id, function(req, res) { res.sendfile(path); }); } @@ -173,7 +173,7 @@ module.exports = function(app, data) { if(meta.config.cookieDomain) { cookie.domain = meta.config.cookieDomain; } - + app.use(session({ store: db.sessionStore, secret: nconf.get('secret'), From 1a97302d68357f13ad06552797539268a8b37435 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 13 Aug 2014 16:25:34 -0400 Subject: [PATCH 2/2] fix double anchors around images if the image is already inside an anchor dont wrap again --- public/src/forum/topic.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index 3df4a2b1c3..0300d58121 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -351,7 +351,10 @@ define('forum/topic', dependencies, function(pagination, infinitescroll, threadT utils.makeNumbersHumanReadable(element.find('.human-readable-number')); element.find('span.timeago').timeago(); element.find('.post-content img:not(.emoji)').addClass('img-responsive').each(function() { - $(this).wrap(''); + var $this = $(this); + if (!$this.parent().is('a')) { + $this.wrap(''); + } }); postTools.updatePostCount(); showBottomPostBar();