Backport fix for CVE-2022-36317: Long URL would hang Firefox for Android (Bug 1759951)