alphagov/whitehall — pull request #1916 by heathd (2014-12-17 11:26:15+00:00)
Title: Support query params and fragment in redirect URL

Content store has now been changed to support anchor fragments and
query parameters[1].

However the Unpublishing presenter currently strips these off when
sending them to content store[2].

This change ensures that the anchor fragment and query parameters are
preserved.

We use URI::Generic.build to compose the pieces of the URI, rather than
trying to do anything too clever with regexps.

[1] https://github.com/alphagov/content-store/pull/93
[2] https://github.com/alphagov/whitehall/blob/master/app/presenters/publishing_api_presenters/unpublishing.rb#L59