Only delete once and escape the [ and ] characters in URIs.