Replace urlencode with our safe_urlencode function