From 57c20d5aae93bfb17b4182f9d7a1097451044f56 Mon Sep 17 00:00:00 2001 From: Abijeet Patro Date: Mon, 8 Jan 2018 16:01:53 +0530 Subject: [PATCH] Prevent "Invalid URL" errors due to trailing spaces when editing Slack Webhook URL (#925) no issue - trim the slack URL in the `updateURL` action --- ghost/admin/app/controllers/settings/apps/slack.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ghost/admin/app/controllers/settings/apps/slack.js b/ghost/admin/app/controllers/settings/apps/slack.js index ff69d6352e..e544745d14 100644 --- a/ghost/admin/app/controllers/settings/apps/slack.js +++ b/ghost/admin/app/controllers/settings/apps/slack.js @@ -65,6 +65,7 @@ export default Controller.extend({ }, updateURL(value) { + value = typeof value === 'string' ? value.trim() : value; this.set('model.url', value); this.get('model.errors').clear(); },