Fix for Firefox failing to encode square brackets in URLs