The function urlencode is used for encoding of path segments. But urlencode escapes
more chars than necessary. This could be a problem for legacy urls.
This adds a correction to the encode process. It decodes the valid but encoded chars.
[#zf2-2461] correcting the url encoding of path segments
This should solve this one: #2461
Merge branch 'hotfix/2710' into develop
Forward port #2710