collapsible_section 0.1.0 → 0.1.2

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: 524092c930ddb71116e48e940ebd81cfb602a9164c3c14fc860e0c31625b6073
4
- data.tar.gz: 1ed792284e2d1f143e0a9478f1bec216f7d430c9f7f5fd87eef1d1d71d926aba
3
+ metadata.gz: 7d8fea31cac021d56b926b0c3febc46ba967cf183208e19ec78c2048ae7c5d58
4
+ data.tar.gz: ff5ac97b8ebbd1ac56a2fb78ce131852c55d00cb38432109a70f4724f5d22b27
5
5
  SHA512:
6
- metadata.gz: beca26ae646a442b20f4ad9788167570e7db374555fbde0f688cff53dcf37d2e42a75bffb05d0343d7d610bc15cfb623ceaa353b9afec6a3894c8c3f9a674563
7
- data.tar.gz: 992f64bb568ab91e2d947d4fe076bbd9d18ba9aeaf76a694c33e09683174e455f91c23e2a6fba0c545200008860cd72b9e09b42720bf54f5c329a1446b096570
6
+ metadata.gz: 1153527ffc6d8e97d43af886681280a7deeb4755798dc8f6a1698a0b64b2a4f78986110c9c03ca8324724e2112aa60f56ce78623659d546f5a4bdebe5f3b7afa
7
+ data.tar.gz: e1fe51aa2ef20aca36767278e98714d5f81d1c5fadd6c60e893fc3ece38508171837317d8a7f55076f2d5c09f721f4a11571f51718af5f0574bb7184a96e6811
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.2] - 2025-08-04
4
+
5
+ ### Fixed
6
+
7
+ - Fixed HTML content escaping issue within collapsible sections where block content was being double-escaped
8
+
9
+ ## [0.1.1] - 2025-08-04
10
+
11
+ ### Fixed
12
+
13
+ - Fixed HTML escaping issue where generated HTML was being escaped as text instead of rendered as proper HTML elements
14
+
3
15
  ## [0.1.0] - 2025-07-20
4
16
 
5
17
  - Initial release
data/README.md CHANGED
@@ -7,7 +7,7 @@ A Rails gem that provides a simple helper method to generate HTML5 `<details>` c
7
7
  Add to Gemfile:
8
8
 
9
9
  ```Gemfile
10
- gem 'collapsible_section', '~> 0.1.0'
10
+ gem 'collapsible_section', '~> 0.1.2'
11
11
  ```
12
12
 
13
13
  After building and installing the gem, replace your selected code with:
@@ -29,33 +29,28 @@ This will generate the same HTML structure but through a reusable gem component:
29
29
 
30
30
  ## Installation
31
31
 
32
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
33
-
34
32
  Install the gem and add to the application's Gemfile by executing:
35
33
 
36
34
  ```bash
37
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
35
+ bundle add collapsible_section
38
36
  ```
39
37
 
40
38
  If bundler is not being used to manage dependencies, install the gem by executing:
41
39
 
42
40
  ```bash
43
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
41
+ gem install collapsible_section
44
42
  ```
45
43
 
46
- ## Usage
47
-
48
- TODO: Write usage instructions here
49
-
50
44
  ## Development
51
45
 
52
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
-
54
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
46
+ ```bash
47
+ gem build collapsible_section.gemspec
48
+ gem push collapsible_section-0.1.2.gem
49
+ ```
55
50
 
56
51
  ## Contributing
57
52
 
58
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/collapsible_section. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/collapsible_section/blob/main/CODE_OF_CONDUCT.md).
53
+ Bug reports and pull requests are welcome on GitHub at https://github.com/yaroslavrick/collapsible_section. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yaroslavrick/collapsible_section/blob/main/CODE_OF_CONDUCT.md).
59
54
 
60
55
  ## License
61
56
 
@@ -63,4 +58,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
63
58
 
64
59
  ## Code of Conduct
65
60
 
66
- Everyone interacting in the CollapsibleSection project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/collapsible_section/blob/main/CODE_OF_CONDUCT.md).
61
+ Everyone interacting in the CollapsibleSection project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yaroslavrick/collapsible_section/blob/main/CODE_OF_CONDUCT.md).
@@ -5,8 +5,10 @@ module CollapsibleSection
5
5
  def collapsible_section(title, open: true, &block)
6
6
  content_tag(:details, class: "section-collapsable", open: open) do
7
7
  summary_content = content_tag(:h3, title, class: "section-title")
8
- concat content_tag(:summary, summary_content, class: "section-header")
9
- concat capture(&block) if block_given?
8
+ summary_tag = content_tag(:summary, summary_content, class: "section-header")
9
+ block_content = block_given? ? capture(&block) : ""
10
+
11
+ (summary_tag + block_content).html_safe
10
12
  end
11
13
  end
12
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CollapsibleSection
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collapsible_section
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yaroslav Yenkala