Replaced urlencode and urldecode by rawurlencode and rawurldecode.