replaced global decodeURIComponent by local