Repare Chrome's crash with encodeURIComponent