unpoly-rails 2.6.1 → 2.7.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of unpoly-rails might be problematic. Click here for more details.

@@ -265,14 +265,18 @@ module Unpoly
265
265
  # Parse the URL to extract the ?query part below.
266
266
  uri = URI.parse(original_url)
267
267
 
268
- # This parses the query as a flat list of key/value pairs.
269
- params = Rack::Utils.parse_query(uri.query)
268
+ # Split at &
269
+ query_parts = uri.query.split('&')
270
270
 
271
271
  # We only used the up[...] params to transport headers, but we don't
272
272
  # want them to appear in a history URL.
273
- non_up_params = params.reject { |key, _value| key.starts_with?(Field::PARAM_PREFIX) }
273
+ non_up_query_parts = query_parts.reject { |query_part| query_part.start_with?(Field::PARAM_PREFIX) }
274
274
 
275
- append_params_to_url(uri.path, non_up_params)
275
+ if non_up_query_parts.empty?
276
+ uri.path
277
+ else
278
+ "#{uri.path}?#{non_up_query_parts.join('&')}"
279
+ end
276
280
  end
277
281
 
278
282
  memoize def layer
@@ -4,6 +4,6 @@ module Unpoly
4
4
  # The current version of the unpoly-rails gem.
5
5
  # This version number is also used for releases of the Unpoly
6
6
  # frontend code.
7
- VERSION = '2.6.1'
7
+ VERSION = '2.7.1.1'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unpoly-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.7.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-10 00:00:00.000000000 Z
11
+ date: 2022-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -121,6 +121,7 @@ files:
121
121
  - assets/unpoly/unpoly.css
122
122
  - assets/unpoly/unpoly.es5.js
123
123
  - assets/unpoly/unpoly.es5.min.js
124
+ - assets/unpoly/unpoly.es6.js
124
125
  - assets/unpoly/unpoly.js
125
126
  - assets/unpoly/unpoly.min.css
126
127
  - assets/unpoly/unpoly.min.js