kmz_compressor 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '0285357fa92cfc382325fb2571dee9fb9d07014253c50b13fa4013f5f4895f2c'
|
4
|
+
data.tar.gz: b46dc5a57ec53f34e5a78f2c6d656832402707994128f73afec9396fc5870694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 372278c020ec26c3b92b571be27df158c62eccccabc64971e8b34852e2dffbb3380a12efe35625dff970dcd91b1d1b3284f1a2ee419aa2ae0f3c9e54c8871a9e
|
7
|
+
data.tar.gz: 5e56612ba29b9527e38ae18012739bcff3ab35c22072750ac4698827215925e2625d41808ebd74d26b8a01a4fd2a004372e05714786099777724e1122e994af4
|
@@ -34,7 +34,6 @@ window.MapLayerManager = function(map){
|
|
34
34
|
}
|
35
35
|
|
36
36
|
function loadKMLLayer(kmlURL, layerName, options) {
|
37
|
-
// Replace spaces with pluses so we don't have problems with some things turning them into %20s and some not
|
38
37
|
kmlURL = sanitizeURI(kmlURL);
|
39
38
|
options = jQuery.extend(true, {zIndex:getDrawOrder(layerName), map:map}, options);
|
40
39
|
|
@@ -269,28 +268,34 @@ window.MapLayerManager = function(map){
|
|
269
268
|
})
|
270
269
|
}
|
271
270
|
|
272
|
-
|
273
|
-
// Matches the middleware process
|
274
|
-
function sanitizeURI(uri){
|
271
|
+
function sanitizeURI(uri) {
|
275
272
|
var url = urlToObject(uri)
|
276
|
-
var pathname = ('/' + decodeURI(url.pathname)).replace(/^\/+/, '/').trim()
|
277
|
-
var search = decodeURIComponent(url.search.replace(/\+/g, '%20')).trim().replace(/^\?/, '') // Ensure all "plus spaces" are hex encoded spaces
|
273
|
+
var pathname = ('/' + decodeURI(url.pathname)).replace(/^\/+/, '/').trim() // Ensure there is a leading slash (IE doesn't provide one, Chrome does, FF does)
|
278
274
|
|
279
|
-
|
275
|
+
var search = url.search.replace(/%26/g, '%2526').replace(/%3D/g, '%253D') // Double encode & and = or else we will be unable to tell them apart from unencoded ones
|
276
|
+
search = search.replace(/\+/g, '%20') // Ensure all "plus spaces" are hex encoded spaces
|
277
|
+
search = decodeURIComponent(search).trim().replace(/^\?/, '') // Remove any leading ?
|
280
278
|
|
281
|
-
|
282
|
-
|
283
|
-
}
|
279
|
+
output = pathname
|
280
|
+
if (search !== '') { output += '?' }
|
284
281
|
|
285
282
|
// Encode the individual uri components
|
286
283
|
output += $.map(search.split('&'), function(component){
|
287
284
|
return $.map(component.split('='), function(kv){
|
285
|
+
// Unencode double encoded & and = from earlier
|
286
|
+
kv = kv.replace(/%26/g, '&').replace(/%3D/g, '=')
|
287
|
+
|
288
|
+
kv = encodeURIComponent(kv)
|
289
|
+
|
288
290
|
// HACK: Firefox 'helps' us out by encoding apostrophes as %27 in AJAX requests, However its encodeURIcomponent method
|
289
291
|
// does not. This difference causes a mismatch between the url we use to calculate the cache path in the browser
|
290
292
|
// and on the server. This hack undoes the damage. See https://bugzilla.mozilla.org/show_bug.cgi?id=407172
|
291
|
-
|
293
|
+
kv = kv.replace(/'/g, '%27')
|
294
|
+
|
295
|
+
return kv
|
292
296
|
}).join('=')
|
293
297
|
}).join('&')
|
298
|
+
|
294
299
|
url.href = output
|
295
300
|
|
296
301
|
return url.href
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kmz_compressor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Wallace
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.7.5
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: Rack Middleware which retrieves KML from Rails and produces KMZ for the client.
|