The second replace was incorrect, resulting in a link like `https://google.com]` which failed zod validation