COOK-5261 Added some formatting to prevent malformed URLs