From d25ab31427acb190ceb2bcae70e20f380491e434 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 16 Apr 2018 15:36:59 -0400 Subject: [PATCH] proper handling of extensionless files --- src/posts/uploads.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posts/uploads.js b/src/posts/uploads.js index 5a78e2e1df..c42620c7ad 100644 --- a/src/posts/uploads.js +++ b/src/posts/uploads.js @@ -9,7 +9,7 @@ module.exports = function (Posts) { Posts.uploads.sync = function (pid, callback) { // Scans a post and updates sorted set of uploads - const searchRegex = /\/assets\/uploads\/files\/([^\s]+\.[\w]+)/g; + const searchRegex = /\/assets\/uploads\/files\/([^\s")]+\.?[\w]*)/g; async.parallel({ content: async.apply(Posts.getPostField, pid, 'content'),