I am generating a url within Element API:
'profile' => UrlHelper::getUrl("directory/company/{$member->id}/{$urlslug}"),
which outputs:
http:\/\/craft.fira\/directory\/company\/1501\/abet-limited
What do I need to do to turn this into a real url without the backwards slashes "\"? As far as I understand this is a regular expression (regex) version of the url?
I will be using javascript to put this on the page, so it could either be fixed at source in the Element api php code, or alternatively when scraping through the JSON with Javascript.
Thanks in advance guys! :-)