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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c6b5fd0dc781212ab38272d45346c794909712510ccf9fb5695fc051845c2e6
4
- data.tar.gz: 358e58f123d4db0cf16d8a3e58c76ed41dda4eedb84ae6d55a5de85d7a3e1ee8
3
+ metadata.gz: 370b1739a798ffa17c0c56589053a41e37823a3b4d07fec1bcfac170aaa7a53e
4
+ data.tar.gz: c6b553780c2b7295b08d97c28918558367cc0dc7db588933cf918cc826b8f2ec
5
5
  SHA512:
6
- metadata.gz: '075693387745cbb74d3088b23161f0bedccbe28ab3da6f232837e47095f682e5c5f6618cec76124466fe81e69552ba77e35982558f379e225a77e7a009c03846'
7
- data.tar.gz: d3d6b0c10cc797c742327b33a40873decf894031d7e11aab3ef6d6d6388785f7951846d18cfeccc36481e4d77e5fbb4445a92ab4b7f6477a0c28fedb05768ec5
6
+ metadata.gz: efa18848338ec66e1ea3c12edbcb17bcdcc3bc05039c1d00b7800613fa17f6dfb0e64d707af3755318d219c908730bc16791f194d60c792f96967bafadb80726
7
+ data.tar.gz: 0d6977f37541df5f7453801e32c9fba27ecd4ec03a1944cd302d857abc0955396ff613f718afa7111eac54bce648b1d010feba7593693bc1ba77aa063a575cb3
@@ -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('+')))
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
3
  module HtmlGrid
4
- VERSION = '1.1.8'
4
+ VERSION = '1.1.9'
5
5
  end
@@ -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.8
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-06-23 00:00:00.000000000 Z
11
+ date: 2020-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sbsm