slimmer 10.1.1 → 10.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36facad821e4323b6d0645d224da049537529162
4
- data.tar.gz: 7b9443ac562b9c4daf8f3dea0d99b07a8b771984
3
+ metadata.gz: cf1be878da47f0dac30e1d4da176bcf05377d3f1
4
+ data.tar.gz: f2097a93fe3ec0695f44930d4f1ea17d545c81a3
5
5
  SHA512:
6
- metadata.gz: 364904aaae05430511ae27cfc6c7c28203302d9e3ead91592aef29d8ce696926fd44a47f060a1c73e2f1b02dabce0dfe1074db8ebe6caaac81276edbde70dcfa
7
- data.tar.gz: 64ee4e355a1c13b343b74b8f149726c957f5409e6b3c67188e6abc57fa6641c34ceb00e6414b19c36b8f90e81b3ffff7b80e24dee5166395201f3cee393324d8
6
+ metadata.gz: 9efdaad3a7bfc7f8a505c3b57b8c1bea7348171dd063591b6973940fc2f552e70f825e1ea76141000256cde9a8dbd9ea444080855be3ef953b2bd965614f30ca
7
+ data.tar.gz: fae17cd6cd6aa4b095f3e9e58833872ac6ab4166be469a164bd20aecf1853335a516c011c660c8c202ed3603e436dae5465da12e263c43da90ddec6fc86c1865
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 10.1.2
2
+
3
+ * Bugfix for request URI's encoded as ASCII
4
+
1
5
  # 10.1.1
2
6
 
3
7
  * Bugfix for caching behaviour
data/lib/slimmer/skin.rb CHANGED
@@ -101,6 +101,12 @@ module Slimmer
101
101
 
102
102
  def success(source_request, response, body)
103
103
  wrapper_id = options[:wrapper_id] || 'wrapper'
104
+
105
+ # The variables set in the source request might not be encoded as UTF-8,
106
+ # Unicorn, for instance, will set them to be ASCII. This shouldn't matter
107
+ # normally because URI's should have UTF-8 characters percent encoded,
108
+ # but not all agents follow this.
109
+ request_url = source_request.url.force_encoding(Encoding::UTF_8)
104
110
  processors = [
105
111
  Processors::TitleInserter.new(),
106
112
  Processors::TagMover.new(),
@@ -114,7 +120,7 @@ module Slimmer
114
120
  Processors::SearchParameterInserter.new(response),
115
121
  Processors::SearchPathSetter.new(response),
116
122
  Processors::ReportAProblemInserter.new(self,
117
- source_request.url,
123
+ request_url,
118
124
  response.headers,
119
125
  wrapper_id),
120
126
  Processors::SearchRemover.new(response.headers),
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = '10.1.1'
2
+ VERSION = '10.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.1.1
4
+ version: 10.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-22 00:00:00.000000000 Z
11
+ date: 2017-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri