The method receives a 'escape' flag. If it's true, the source string will be escaped before executing the replacement.
The end-user goal is to avoid adding '.' in the portal name. The urlToken directive plays with it, so it will have to replace that char with something else (probably, an empty string '').
Please complete the tests on replaceToken to ensure this works as expected.
This is almost done, actually.
The method receives a 'escape' flag. If it's true, the source string will be escaped before executing the replacement.
The end-user goal is to avoid adding '.' in the portal name. The urlToken directive plays with it, so it will have to replace that char with something else (probably, an empty string '').
Please complete the tests on replaceToken to ensure this works as expected.