Closed ErikDakoda closed 5 years ago
Maybe we need to add a makeAbsolute()
util that takes a path and makes it absolute, adding a slash if need be?
In addition to Utils.getSiteUrl(), there is now a Utils.getRootUrl() function that returns the siteUrl
setting without a slash.
All paths in routes start with a slash. For example in vulcan-admin/lib/modules/routes.js:
However Utils.getSiteUrl() in vulcan-lib/lib/modules/utils.js adds a slash at the end of all root URLs.
So when you combine the two to form a full URL, in an email, for example
{{siteUrl}}{{myPage}}
, you end up with a double slash.In fact I have noticed that in the vulcan code base the last character is constantly being sliced off the result of Utils.getSiteUrl(). Shouldn't we fix this?