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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8ad0813834cb6bd2644994071c6801fe586942dc0923a1b4af96ad107763065
4
- data.tar.gz: e932567a95dff7cdf94b6d038de02947881be91bd8273ee9740118dc4f00522f
3
+ metadata.gz: 2c6b5fd0dc781212ab38272d45346c794909712510ccf9fb5695fc051845c2e6
4
+ data.tar.gz: 358e58f123d4db0cf16d8a3e58c76ed41dda4eedb84ae6d55a5de85d7a3e1ee8
5
5
  SHA512:
6
- metadata.gz: ecb7c4b18e3ad86bf65fa0910d37c63e36603cde3a8a0cb1d0d3fa0fcacaedf05d79cb14b20bf3b21789f4e69aefeea13503004733171b6fed39faf129358698
7
- data.tar.gz: 95a97292f4446b925718552fd3a51db0745275d1bd4f456a1e4948666ba5471580d41d0328d0ab25bac62aae4c48fb934408102f3ec1197b3220e641731a7483
6
+ metadata.gz: '075693387745cbb74d3088b23161f0bedccbe28ab3da6f232837e47095f682e5c5f6618cec76124466fe81e69552ba77e35982558f379e225a77e7a009c03846'
7
+ data.tar.gz: d3d6b0c10cc797c742327b33a40873decf894031d7e11aab3ef6d6d6388785f7951846d18cfeccc36481e4d77e5fbb4445a92ab4b7f6477a0c28fedb05768ec5
@@ -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
- value =CGI.unescape(value) if value && value.is_a?(String)
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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
3
  module HtmlGrid
4
- VERSION = '1.1.7'
4
+ VERSION = '1.1.8'
5
5
  end
@@ -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
@@ -27,6 +27,7 @@ $: << File.dirname(__FILE__)
27
27
 
28
28
  require 'minitest/autorun'
29
29
  require 'stub/cgi'
30
+ require 'htmlgrid/template'
30
31
  require 'htmlgrid/dojotoolkit'
31
32
  require 'test_helper'
32
33
  require 'flexmock/minitest'
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.7
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-16 00:00:00.000000000 Z
11
+ date: 2020-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sbsm