Changes the internal code of \Drupal\Core\Routing\UrlGenerator::doGenerate() so that it does not urlencode or append the query string
Changes the return value of UrlGenerator::getPathFromRoute() so that it is not be urlencoded
Urlencodes and appends the query string in \Drupal\Core\Routing\UrlGenerator::generateFromRoute() after the path processors have acted
Since the expected return value of some methods is not clearly specified or tested, this may be a minor behavior change, but is not an API change.
The $options['query'] param for \Drupal\Core\Routing\UrlGenerator::generateFromRoute() is documented as being an array and for url() in Drupal 7 could also only be passed as an array. However, the incorrect use of http_build_query() for the extremely rare case of a route with the option _no_path param (in core only the '<none>' and '<nolink>' routes) means a string $options['query'] would have worked when generating a URL with no path prior to this fix, but not after.