htmlgrid 1.1.7 → 1.1.8
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 +4 -4
- data/lib/htmlgrid/component.rb +3 -1
- data/lib/htmlgrid/version.rb +1 -1
- data/test/test_component.rb +15 -0
- data/test/test_dojotoolkit.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c6b5fd0dc781212ab38272d45346c794909712510ccf9fb5695fc051845c2e6
|
4
|
+
data.tar.gz: 358e58f123d4db0cf16d8a3e58c76ed41dda4eedb84ae6d55a5de85d7a3e1ee8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '075693387745cbb74d3088b23161f0bedccbe28ab3da6f232837e47095f682e5c5f6618cec76124466fe81e69552ba77e35982558f379e225a77e7a009c03846'
|
7
|
+
data.tar.gz: d3d6b0c10cc797c742327b33a40873decf894031d7e11aab3ef6d6d6388785f7951846d18cfeccc36481e4d77e5fbb4445a92ab4b7f6477a0c28fedb05768ec5
|
data/lib/htmlgrid/component.rb
CHANGED
@@ -223,7 +223,9 @@ module HtmlGrid
|
|
223
223
|
elsif(value.respond_to?(:to_html))
|
224
224
|
value.to_html(context).to_s.force_encoding('utf-8')
|
225
225
|
else
|
226
|
-
|
226
|
+
if value && value.is_a?(String)
|
227
|
+
value =CGI.unescape(value.gsub('+', CGI.escape('+')))
|
228
|
+
end
|
227
229
|
end
|
228
230
|
end
|
229
231
|
private
|
data/lib/htmlgrid/version.rb
CHANGED
data/test/test_component.rb
CHANGED
@@ -38,6 +38,8 @@ module HtmlGrid
|
|
38
38
|
end
|
39
39
|
|
40
40
|
class TestComponent < Minitest::Test
|
41
|
+
STRING_WITH_SHARP = "Test_#_gartenhat"
|
42
|
+
STRING_WITH_PLUS = "Test_+_plus"
|
41
43
|
STRING_WITH_UMLAUT = "Test_with_Umlaut_üé"
|
42
44
|
class StubAttributeComponent < HtmlGrid::Component
|
43
45
|
HTML_ATTRIBUTES = { "key" => "val" }
|
@@ -78,6 +80,19 @@ class TestComponent < Minitest::Test
|
|
78
80
|
comp = HtmlGrid::Component.new("foo", "bar", "baz").to_html(CGI.new)
|
79
81
|
assert_equal("", comp)
|
80
82
|
end
|
83
|
+
|
84
|
+
def test_gartenhag_to_html
|
85
|
+
comp = HtmlGrid::Component.new('context')
|
86
|
+
comp.value = STRING_WITH_SHARP
|
87
|
+
result = comp.to_html(CGI.new)
|
88
|
+
assert_equal(STRING_WITH_SHARP, result)
|
89
|
+
end
|
90
|
+
def test_minus_to_html
|
91
|
+
comp = HtmlGrid::Component.new('context')
|
92
|
+
comp.value = STRING_WITH_PLUS
|
93
|
+
result = comp.to_html(CGI.new)
|
94
|
+
assert_equal(STRING_WITH_PLUS, result)
|
95
|
+
end
|
81
96
|
def test_umlaut_to_html
|
82
97
|
comp = HtmlGrid::Component.new('context')
|
83
98
|
comp.value = STRING_WITH_UMLAUT
|
data/test/test_dojotoolkit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htmlgrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaomi Hatakeyama, Zeno R.R. Davatz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sbsm
|