htmlgrid 1.1.8 → 1.1.9
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 +1 -1
- data/lib/htmlgrid/version.rb +1 -1
- data/test/test_component.rb +15 -1
- 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: 370b1739a798ffa17c0c56589053a41e37823a3b4d07fec1bcfac170aaa7a53e
|
4
|
+
data.tar.gz: c6b553780c2b7295b08d97c28918558367cc0dc7db588933cf918cc826b8f2ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efa18848338ec66e1ea3c12edbcb17bcdcc3bc05039c1d00b7800613fa17f6dfb0e64d707af3755318d219c908730bc16791f194d60c792f96967bafadb80726
|
7
|
+
data.tar.gz: 0d6977f37541df5f7453801e32c9fba27ecd4ec03a1944cd302d857abc0955396ff613f718afa7111eac54bce648b1d010feba7593693bc1ba77aa063a575cb3
|
data/lib/htmlgrid/component.rb
CHANGED
@@ -221,7 +221,7 @@ module HtmlGrid
|
|
221
221
|
if(value.is_a?(Array))
|
222
222
|
value.collect { |item| _to_html(context, item) }.join(' ')
|
223
223
|
elsif(value.respond_to?(:to_html))
|
224
|
-
value.to_html(context).to_s.force_encoding('utf-8')
|
224
|
+
value.to_html(context).to_s.dup.force_encoding('utf-8')
|
225
225
|
else
|
226
226
|
if value && value.is_a?(String)
|
227
227
|
value =CGI.unescape(value.gsub('+', CGI.escape('+')))
|
data/lib/htmlgrid/version.rb
CHANGED
data/test/test_component.rb
CHANGED
@@ -56,6 +56,14 @@ class TestComponent < Minitest::Test
|
|
56
56
|
class StubContainer
|
57
57
|
attr_accessor :onsubmit
|
58
58
|
end
|
59
|
+
class ToHTMLreturnFrozen
|
60
|
+
def initialize content
|
61
|
+
@content = content
|
62
|
+
end
|
63
|
+
def to_html(what)
|
64
|
+
return @content.to_s.freeze
|
65
|
+
end
|
66
|
+
end
|
59
67
|
def setup
|
60
68
|
@component = HtmlGrid::Component.new(nil, nil)
|
61
69
|
end
|
@@ -80,7 +88,13 @@ class TestComponent < Minitest::Test
|
|
80
88
|
comp = HtmlGrid::Component.new("foo", "bar", "baz").to_html(CGI.new)
|
81
89
|
assert_equal("", comp)
|
82
90
|
end
|
83
|
-
|
91
|
+
# Next is test for https://github.com/zdavatz/oddb.org/issues/118 FrozenError at /de/just-medical
|
92
|
+
def test_to_html_frozen_empty
|
93
|
+
comp = HtmlGrid::Component.new('context')
|
94
|
+
comp.value = ToHTMLreturnFrozen.new('')
|
95
|
+
result = comp.to_html(CGI.new)
|
96
|
+
assert_equal('', result)
|
97
|
+
end
|
84
98
|
def test_gartenhag_to_html
|
85
99
|
comp = HtmlGrid::Component.new('context')
|
86
100
|
comp.value = STRING_WITH_SHARP
|
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.9
|
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-
|
11
|
+
date: 2020-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sbsm
|