zachleat’s avatarzachleat’s Twitter Archive—№ 36,864

  1. Query parameter parsing quiz: https​://example.com/?url=https://example.com/first/?url=https://example.com/second/ In the above, the value of the url query parameter is equal to: 1️⃣ https​://example.com/first/?url=https://example.com/second/ 2️⃣ https​://example.com/second/
    1. …in reply to @zachleat
      Follow up: it’s #1! You can check this behavior using (new URL("example.com/?url=https://example.com/first/?url=https://example.com/second/")).searchParams.get("url") Better: Use encodeURIComponent to encode the param and make this irrelevant. More from @patmeenan: @patmeenan/1377301255970770946