Fixes #6637 rework url helper and tests. #4437