From 73aa3138cd6f2946afc54807b3e5720250f184c9 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Tue, 9 Dec 2014 10:53:52 +0900 Subject: [PATCH] change getOutgoingUrl so it doesn't use IR but the siteUrl setting instead --- lib/helpers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/helpers.js b/lib/helpers.js index 69eef93cd..c6ae4a5e0 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -88,7 +88,9 @@ invitesEnabled = function () { return getSetting("requireViewInvite") || getSetting("requirePostInvite"); }; getOutgoingUrl = function(url){ - return Router.routes['out'].url({}, {query: {url: url}}); + // we don't use IR's url() function here in case ROOT_URL hasn't been set + var cleanUrl = encodeURIComponent(url); + return getSetting('siteUrl', Meteor.absoluteUrl()) + 'out?url=' + cleanUrl; }; // ---------------------------------- String Helper Functions ----------------------------------- // cleanUp = function(s){