actionview 7.1.5.2 → 7.2.3.1

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +104 -416
  3. data/README.rdoc +1 -1
  4. data/lib/action_view/base.rb +24 -9
  5. data/lib/action_view/cache_expiry.rb +9 -3
  6. data/lib/action_view/dependency_tracker/{ripper_tracker.rb → ruby_tracker.rb} +4 -3
  7. data/lib/action_view/dependency_tracker.rb +1 -1
  8. data/lib/action_view/digestor.rb +6 -2
  9. data/lib/action_view/gem_version.rb +3 -3
  10. data/lib/action_view/helpers/asset_tag_helper.rb +19 -7
  11. data/lib/action_view/helpers/atom_feed_helper.rb +1 -1
  12. data/lib/action_view/helpers/cache_helper.rb +2 -2
  13. data/lib/action_view/helpers/csrf_helper.rb +1 -1
  14. data/lib/action_view/helpers/date_helper.rb +8 -1
  15. data/lib/action_view/helpers/form_helper.rb +222 -217
  16. data/lib/action_view/helpers/form_options_helper.rb +6 -3
  17. data/lib/action_view/helpers/form_tag_helper.rb +80 -47
  18. data/lib/action_view/helpers/output_safety_helper.rb +5 -6
  19. data/lib/action_view/helpers/tag_helper.rb +213 -20
  20. data/lib/action_view/helpers/tags/collection_helpers.rb +2 -1
  21. data/lib/action_view/helpers/text_helper.rb +11 -4
  22. data/lib/action_view/helpers/url_helper.rb +3 -77
  23. data/lib/action_view/layouts.rb +8 -10
  24. data/lib/action_view/log_subscriber.rb +8 -4
  25. data/lib/action_view/railtie.rb +0 -1
  26. data/lib/action_view/render_parser/prism_render_parser.rb +127 -0
  27. data/lib/action_view/{ripper_ast_parser.rb → render_parser/ripper_render_parser.rb} +152 -9
  28. data/lib/action_view/render_parser.rb +21 -169
  29. data/lib/action_view/renderer/abstract_renderer.rb +1 -1
  30. data/lib/action_view/renderer/partial_renderer.rb +2 -2
  31. data/lib/action_view/renderer/renderer.rb +32 -38
  32. data/lib/action_view/renderer/template_renderer.rb +3 -3
  33. data/lib/action_view/rendering.rb +4 -4
  34. data/lib/action_view/template/error.rb +11 -0
  35. data/lib/action_view/template/handlers/erb.rb +45 -37
  36. data/lib/action_view/template/renderable.rb +7 -1
  37. data/lib/action_view/template/resolver.rb +0 -2
  38. data/lib/action_view/template.rb +36 -8
  39. data/lib/action_view/test_case.rb +7 -10
  40. data/lib/action_view.rb +1 -0
  41. metadata +29 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2aeec9b1f8aa7329a12b915a01643502803b90d4d27fb7ccce1bd0ce83259ebf
4
- data.tar.gz: 3a1a8e48e41c1bfc2dd55ef5d62a155db86ff94dfc5575665e96ae3a5b6e1cb7
3
+ metadata.gz: 61f8e3426843a85e006134bb5d330f91e09457e3392025afab472d470d706929
4
+ data.tar.gz: c066f5cc2718465d6f24a8c81ee5361c3c9fcbef2288a8d04b77334e9c724ad9
5
5
  SHA512:
6
- metadata.gz: 78166989c02e7657381b83bcb34dcb7867c2d866fa282d2db7ad4c25b9c874499d8e6a0bcbce1bb94ec83d0db48d789da15211abe197a309b0e21718be996c74
7
- data.tar.gz: 204df71ee43e468f66334d81d55617da2badea9e0ac18c12cbd17e0771e5d376ad549db5986cd44b838bdeb5e562622e7dd4dc7ee3829289ccd619461b9ec3ed
6
+ metadata.gz: 0a9f2a3f39681a4687a4b8a42b10e00be43c0ee413037c9f236b3bbc04961c8d9993ee955bb0b940a5f05c0024c8f17abb3106d4420f0dea593dd020f038df55
7
+ data.tar.gz: b259ce7c6e668708a25ca4e61551bbe65aee7c898cf6c2da3ba0d2c40f64e6ccc5adc2067f817e95ac1f913edbb34b9e75ec4de89e058899c7644ecf4fbf5fb5
data/CHANGELOG.md CHANGED
@@ -1,521 +1,209 @@
1
- ## Rails 7.1.5.2 (August 13, 2025) ##
1
+ ## Rails 7.2.3.1 (March 23, 2026) ##
2
2
 
3
- * No changes.
4
-
5
-
6
- ## Rails 7.1.5.1 (December 10, 2024) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 7.1.5 (October 30, 2024) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 7.1.4.2 (October 23, 2024) ##
17
-
18
- * No changes.
3
+ * Skip blank attribute names in tag helpers to avoid generating invalid HTML.
19
4
 
5
+ [CVE-2026-33168]
20
6
 
21
- ## Rails 7.1.4.1 (October 15, 2024) ##
22
-
23
- * No changes.
7
+ *Mike Dalessio*
24
8
 
25
9
 
26
- ## Rails 7.1.4 (August 22, 2024) ##
10
+ ## Rails 7.2.3 (October 28, 2025) ##
27
11
 
28
- * Action View Test Case `rendered` memoization.
12
+ * Fix `javascript_include_tag` `type` option to accept either strings and symbols.
29
13
 
30
- *Sean Doyle*
14
+ ```ruby
15
+ javascript_include_tag "application", type: :module
16
+ javascript_include_tag "application", type: "module"
17
+ ```
31
18
 
32
- * Restore the ability for templates to return any kind of object and not just strings
19
+ Previously, only the string value was recoginized.
33
20
 
34
21
  *Jean Boussier*
35
22
 
36
- * Fix threading issue with strict locals.
37
-
38
- *Robert Fletcher*
39
-
40
-
41
- ## Rails 7.1.3.4 (June 04, 2024) ##
42
-
43
- * No changes.
44
-
45
-
46
- ## Rails 7.1.3.3 (May 16, 2024) ##
47
-
48
- * No changes.
49
-
50
-
51
- ## Rails 7.1.3.2 (February 21, 2024) ##
52
-
53
- * No changes.
54
-
55
-
56
- ## Rails 7.1.3.1 (February 21, 2024) ##
57
-
58
- * No changes.
59
-
60
-
61
- ## Rails 7.1.3 (January 16, 2024) ##
62
-
63
- * Better handle SyntaxError in Action View.
64
-
65
- *Mario Caropreso*
66
-
67
- * Fix `word_wrap` with empty string.
23
+ * Fix `excerpt` helper with non-whitespace separator.
68
24
 
69
25
  *Jonathan Hefner*
70
26
 
71
- * Rename `ActionView::TestCase::Behavior::Content` to `ActionView::TestCase::Behavior::RenderedViewContent`.
72
-
73
- Make `RenderedViewContent` inherit from `String`. Make private API with `:nodoc:`.
74
-
75
- *Sean Doyle*
76
-
77
- * Fix detection of required strict locals.
78
-
79
- Further fix `render @collection` compatibility with strict locals
80
-
81
- *Jean Boussier*
82
-
27
+ * Respect `html_options[:form]` when `collection_checkboxes` generates the
28
+ hidden `<input>`.
83
29
 
84
- ## Rails 7.1.2 (November 10, 2023) ##
30
+ *Riccardo Odone*
85
31
 
86
- * Fix the `number_to_human_size` view helper to correctly work with negative numbers.
32
+ * Layouts have access to local variables passed to `render`.
87
33
 
88
- *Earlopain*
34
+ This fixes #31680 which was a regression in Rails 5.1.
89
35
 
90
- * Automatically discard the implicit locals injected by collection rendering for template that can't accept them
36
+ *Mike Dalessio*
91
37
 
92
- When rendering a collection, two implicit variables are injected, which breaks templates with strict locals.
38
+ * Argument errors related to strict locals in templates now raise an
39
+ `ActionView::StrictLocalsError`, and all other argument errors are reraised as-is.
93
40
 
94
- Now they are only passed if the template will actually accept them.
41
+ Previously, any `ArgumentError` raised during template rendering was swallowed during strict
42
+ local error handling, so that an `ArgumentError` unrelated to strict locals (e.g., a helper
43
+ method invoked with incorrect arguments) would be replaced by a similar `ArgumentError` with an
44
+ unrelated backtrace, making it difficult to debug templates.
95
45
 
96
- *Yasha Krasnou*, *Jean Boussier*
46
+ Now, any `ArgumentError` unrelated to strict locals is reraised, preserving the original
47
+ backtrace for developers.
97
48
 
98
- * Fix `@rails/ujs` calling `start()` an extra time when using bundlers
49
+ Also note that `ActionView::StrictLocalsError` is a subclass of `ArgumentError`, so any existing
50
+ code that rescues `ArgumentError` will continue to work.
99
51
 
100
- *Hartley McGuire*, *Ryunosuke Sato*
52
+ Fixes #52227.
101
53
 
102
- * Fix the `capture` view helper compatibility with HAML and Slim
54
+ *Mike Dalessio*
103
55
 
104
- When a blank string was captured in HAML or Slim (and possibly other template engines)
105
- it would instead return the entire buffer.
56
+ * Fix stack overflow error in dependency tracker when dealing with circular dependencies
106
57
 
107
58
  *Jean Boussier*
108
59
 
60
+ * Fix a crash in ERB template error highlighting when the error occurs on a
61
+ line in the compiled template that is past the end of the source template.
109
62
 
110
- ## Rails 7.1.1 (October 11, 2023) ##
63
+ *Martin Emde*
111
64
 
112
- * Updated `@rails/ujs` files to ignore certain data-* attributes when element is contenteditable.
65
+ * Improve reliability of ERB template error highlighting.
66
+ Fix infinite loops and crashes in highlighting and
67
+ improve tolerance for alternate ERB handlers.
113
68
 
114
- This fix was already landed in >= 7.0.4.3, < 7.1.0.
115
- [[CVE-2023-23913](https://github.com/advisories/GHSA-xp5h-f8jf-rc8q)]
116
-
117
- *Ryunosuke Sato*
69
+ *Martin Emde*
118
70
 
119
71
 
120
- ## Rails 7.1.0 (October 05, 2023) ##
72
+ ## Rails 7.2.2.2 (August 13, 2025) ##
121
73
 
122
74
  * No changes.
123
75
 
124
76
 
125
- ## Rails 7.1.0.rc2 (October 01, 2023) ##
77
+ ## Rails 7.2.2.1 (December 10, 2024) ##
126
78
 
127
79
  * No changes.
128
80
 
129
81
 
130
- ## Rails 7.1.0.rc1 (September 27, 2023) ##
131
-
132
- * Introduce `ActionView::TestCase.register_parser`
133
-
134
- ```ruby
135
- register_parser :rss, -> rendered { RSS::Parser.parse(rendered) }
136
-
137
- test "renders RSS" do
138
- article = Article.create!(title: "Hello, world")
139
-
140
- render formats: :rss, partial: article
141
-
142
- assert_equal "Hello, world", rendered.rss.items.last.title
143
- end
144
- ```
145
-
146
- By default, register parsers for `:html` and `:json`.
82
+ ## Rails 7.2.2 (October 30, 2024) ##
147
83
 
148
- *Sean Doyle*
149
-
150
-
151
- ## Rails 7.1.0.beta1 (September 13, 2023) ##
152
-
153
- * Fix `simple_format` with blank `wrapper_tag` option returns plain html tag
154
-
155
- By default `simple_format` method returns the text wrapped with `<p>`. But if we explicitly specify
156
- the `wrapper_tag: nil` in the options, it returns the text wrapped with `<></>` tag.
157
-
158
- Before:
159
-
160
- ```ruby
161
- simple_format("Hello World", {}, { wrapper_tag: nil })
162
- # <>Hello World</>
163
- ```
84
+ * No changes.
164
85
 
165
- After:
166
86
 
167
- ```ruby
168
- simple_format("Hello World", {}, { wrapper_tag: nil })
169
- # <p>Hello World</p>
170
- ```
87
+ ## Rails 7.2.1.2 (October 23, 2024) ##
171
88
 
172
- *Akhil G Krishnan*, *Junichi Ito*
89
+ * No changes.
173
90
 
174
- * Don't double-encode nested `field_id` and `field_name` index values
175
91
 
176
- Pass `index: @options` as a default keyword argument to `field_id` and
177
- `field_name` view helper methods.
92
+ ## Rails 7.2.1.1 (October 15, 2024) ##
178
93
 
179
- *Sean Doyle*
94
+ * No changes.
180
95
 
181
- * Allow opting in/out of `Link preload` headers when calling `stylesheet_link_tag` or `javascript_include_tag`
182
96
 
183
- ```ruby
184
- # will exclude header, even if setting is enabled:
185
- javascript_include_tag("http://example.com/all.js", preload_links_header: false)
97
+ ## Rails 7.2.1 (August 22, 2024) ##
186
98
 
187
- # will include header, even if setting is disabled:
188
- stylesheet_link_tag("http://example.com/all.js", preload_links_header: true)
189
- ```
99
+ * No changes.
190
100
 
191
- *Alex Ghiculescu*
192
101
 
193
- * Stop generating `Link preload` headers once it has reached 1KB.
102
+ ## Rails 7.2.0 (August 09, 2024) ##
194
103
 
195
- Some proxies have trouble handling large headers, but more importantly preload links
196
- have diminishing returns so it's preferable not to go overboard with them.
104
+ * Fix templates with strict locals to also include `local_assigns`.
197
105
 
198
- If tighter control is needed, it's recommended to disable automatic generation of preloads
199
- and to generate them manually from the controller or from a middleware.
106
+ Previously templates defining strict locals wouldn't receive the `local_assigns`
107
+ hash.
200
108
 
201
109
  *Jean Boussier*
202
110
 
203
- * `simple_format` helper now handles a `:sanitize_options` - any extra options you want appending to the sanitize.
111
+ * Add queries count to template rendering instrumentation.
204
112
 
205
- Before:
206
- ```ruby
207
- simple_format("<a target=\"_blank\" href=\"http://example.com\">Continue</a>")
208
- # => "<p><a href=\"http://example.com\">Continue</a></p>"
209
113
  ```
114
+ # Before
115
+ Completed 200 OK in 3804ms (Views: 41.0ms | ActiveRecord: 33.5ms | Allocations: 112788)
210
116
 
211
- After:
212
- ```ruby
213
- simple_format("<a target=\"_blank\" href=\"http://example.com\">Continue</a>", {}, { sanitize_options: { attributes: %w[target href] } })
214
- # => "<p><a target=\"_blank\" href=\"http://example.com\">Continue</a></p>"
117
+ # After
118
+ Completed 200 OK in 3804ms (Views: 41.0ms | ActiveRecord: 33.5ms (2 queries, 1 cached) | Allocations: 112788)
215
119
  ```
216
120
 
217
- *Andrei Andriichuk*
218
-
219
- * Add support for HTML5 standards-compliant sanitizers, and default to `Rails::HTML5::Sanitizer`
220
- in the Rails 7.1 configuration if it is supported.
221
-
222
- Action View's HTML sanitizers can be configured by setting
223
- `config.action_view.sanitizer_vendor`. Supported values are `Rails::HTML4::Sanitizer` or
224
- `Rails::HTML5::Sanitizer`.
225
-
226
- The Rails 7.1 configuration will set this to `Rails::HTML5::Sanitizer` when it is supported, and
227
- fall back to `Rails::HTML4::Sanitizer`. Previous configurations default to
228
- `Rails::HTML4::Sanitizer`.
229
-
230
- *Mike Dalessio*
231
-
232
- * `config.dom_testing_default_html_version` controls the HTML parser used by
233
- `ActionView::TestCase#document_root_element`, which creates the DOM used by the assertions in
234
- Rails::Dom::Testing.
235
-
236
- The Rails 7.1 default configuration opts into the HTML5 parser when it is supported, to better
237
- represent what the DOM would be in a browser user agent. Previously this test helper always used
238
- Nokogiri's HTML4 parser.
239
-
240
- *Mike Dalessio*
121
+ *fatkodima*
241
122
 
242
- * Add support for the HTML picture tag. It supports passing a String, an Array or a Block.
243
- Supports passing properties directly to the img tag via the `:image` key.
244
- Since the picture tag requires an img tag, the last element you provide will be used for the img tag.
245
- For complete control over the picture tag, a block can be passed, which will populate the contents of the tag accordingly.
246
-
247
- Can be used like this for a single source:
248
- ```erb
249
- <%= picture_tag("picture.webp") %>
250
- ```
251
- which will generate the following:
252
- ```html
253
- <picture>
254
- <img src="/images/picture.webp" />
255
- </picture>
256
- ```
123
+ * Raise `ArgumentError` if `:renderable` object does not respond to `#render_in`.
257
124
 
258
- For multiple sources:
259
- ```erb
260
- <%= picture_tag("picture.webp", "picture.png", :class => "mt-2", :image => { alt: "Image", class: "responsive-img" }) %>
261
- ```
262
- will generate:
263
- ```html
264
- <picture class="mt-2">
265
- <source srcset="/images/picture.webp" />
266
- <source srcset="/images/picture.png" />
267
- <img alt="Image" class="responsive-img" src="/images/picture.png" />
268
- </picture>
269
- ```
125
+ *Sean Doyle*
270
126
 
271
- Full control via a block:
272
- ```erb
273
- <%= picture_tag(:class => "my-class") do %>
274
- <%= tag(:source, :srcset => image_path("picture.webp")) %>
275
- <%= tag(:source, :srcset => image_path("picture.png")) %>
276
- <%= image_tag("picture.png", :alt => "Image") %>
277
- <% end %>
278
- ```
279
- will generate:
280
- ```html
281
- <picture class="my-class">
282
- <source srcset="/images/picture.webp" />
283
- <source srcset="/images/picture.png" />
284
- <img alt="Image" src="/images/picture.png" />
285
- </picture>
286
- ```
127
+ * Add the `nonce: true` option for `stylesheet_link_tag` helper to support automatic nonce generation for Content Security Policy.
287
128
 
288
- *Juan Pablo Balarini*
129
+ Works the same way as `javascript_include_tag nonce: true` does.
289
130
 
290
- * Remove deprecated support to passing instance variables as locals to partials.
131
+ *Akhil G Krishnan*, *AJ Esler*
291
132
 
292
- *Rafael Mendonça França*
133
+ * Parse `ActionView::TestCase#rendered` HTML content as `Nokogiri::XML::DocumentFragment` instead of `Nokogiri::XML::Document`.
293
134
 
294
- * Remove deprecated constant `ActionView::Path`.
135
+ *Sean Doyle*
295
136
 
296
- *Rafael Mendonça França*
137
+ * Rename `ActionView::TestCase::Behavior::Content` to `ActionView::TestCase::Behavior::RenderedViewContent`.
297
138
 
298
- * Guard `token_list` calls from escaping HTML too often
139
+ Make `RenderedViewContent` inherit from `String`. Make private API with `:nodoc:`
299
140
 
300
141
  *Sean Doyle*
301
142
 
302
- * `select` can now be called with a single hash containing options and some HTML options
303
-
304
- Previously this would not work as expected:
305
-
306
- ```erb
307
- <%= select :post, :author, authors, required: true %>
308
- ```
143
+ * Deprecate passing `nil` as value for the `model:` argument to the `form_with` method.
309
144
 
310
- Instead you needed to do this:
145
+ *Collin Jilbert*
311
146
 
312
- ```erb
313
- <%= select :post, :author, authors, {}, required: true %>
314
- ```
147
+ * Alias `field_set_tag` helper to `fieldset_tag` to match `<fieldset>` element.
315
148
 
316
- Now, either form is accepted, for the following HTML attributes: `required`, `multiple`, `size`.
149
+ *Sean Doyle*
317
150
 
318
- *Alex Ghiculescu*
151
+ * Deprecate passing content to void elements when using `tag.br` type tag builders.
319
152
 
320
- * Datetime form helpers (`time_field`, `date_field`, `datetime_field`, `week_field`, `month_field`) now accept an instance of Time/Date/DateTime as `:value` option.
153
+ *Hartley McGuire*
321
154
 
322
- Before:
323
- ```erb
324
- <%= form.datetime_field :written_at, value: Time.current.strftime("%Y-%m-%dT%T") %>
325
- ```
155
+ * Fix the `number_to_human_size` view helper to correctly work with negative numbers.
326
156
 
327
- After:
328
- ```erb
329
- <%= form.datetime_field :written_at, value: Time.current %>
330
- ```
157
+ *Earlopain*
331
158
 
332
- *Andrey Samsonov*
159
+ * Automatically discard the implicit locals injected by collection rendering for template that can't accept them.
333
160
 
334
- * Choices of `select` can optionally contain html attributes as the last element
335
- of the child arrays when using grouped/nested collections
161
+ When rendering a collection, two implicit variables are injected, which breaks templates with strict locals.
336
162
 
337
- ```erb
338
- <%= form.select :foo, [["North America", [["United States","US"],["Canada","CA"]], { disabled: "disabled" }]] %>
339
- # => <select><optgroup label="North America" disabled="disabled"><option value="US">United States</option><option value="CA">Canada</option></optgroup></select>
340
- ```
163
+ Now they are only passed if the template will actually accept them.
341
164
 
342
- *Chris Gunther*
165
+ *Yasha Krasnou*, *Jean Boussier*
343
166
 
344
- * `check_box_tag` and `radio_button_tag` now accept `checked` as a keyword argument
167
+ * Fix `@rails/ujs` calling `start()` an extra time when using bundlers.
345
168
 
346
- This is to make the API more consistent with the `FormHelper` variants. You can now
347
- provide `checked` as a positional or keyword argument:
169
+ *Hartley McGuire*, *Ryunosuke Sato*
348
170
 
349
- ```erb
350
- = check_box_tag "admin", "1", false
351
- = check_box_tag "admin", "1", checked: false
171
+ * Fix the `capture` view helper compatibility with HAML and Slim.
352
172
 
353
- = radio_button_tag 'favorite_color', 'maroon', false
354
- = radio_button_tag 'favorite_color', 'maroon', checked: false
355
- ```
173
+ When a blank string was captured in HAML or Slim (and possibly other template engines)
174
+ it would instead return the entire buffer.
356
175
 
357
- *Alex Ghiculescu*
176
+ *Jean Boussier*
358
177
 
359
- * Allow passing a class to `dom_id`.
360
- You no longer need to call `new` when passing a class to `dom_id`.
361
- This makes `dom_id` behave like `dom_class` in this regard.
362
- Apart from saving a few keystrokes, it prevents Ruby from needing
363
- to instantiate a whole new object just to generate a string.
178
+ * Updated `@rails/ujs` files to ignore certain data-* attributes when element is contenteditable.
364
179
 
365
- Before:
366
- ```ruby
367
- dom_id(Post) # => NoMethodError: undefined method `to_key' for Post:Class
368
- ```
180
+ This fix was already landed in >= 7.0.4.3, < 7.1.0.
181
+ [[CVE-2023-23913](https://github.com/advisories/GHSA-xp5h-f8jf-rc8q)]
369
182
 
370
- After:
371
- ```ruby
372
- dom_id(Post) # => "new_post"
373
- ```
183
+ *Ryunosuke Sato*
374
184
 
375
- *Goulven Champenois*
185
+ * Added validation for HTML tag names in the `tag` and `content_tag` helper method.
376
186
 
377
- * Report `:locals` as part of the data returned by ActionView render instrumentation.
187
+ The `tag` and `content_tag` method now checks that the provided tag name adheres to the HTML
188
+ specification. If an invalid HTML tag name is provided, the method raises an `ArgumentError`
189
+ with an appropriate error message.
378
190
 
379
- Before:
380
- ```ruby
381
- {
382
- identifier: "/Users/adam/projects/notifications/app/views/posts/index.html.erb",
383
- layout: "layouts/application"
384
- }
385
- ```
191
+ Examples:
386
192
 
387
- After:
388
193
  ```ruby
389
- {
390
- identifier: "/Users/adam/projects/notifications/app/views/posts/index.html.erb",
391
- layout: "layouts/application",
392
- locals: {foo: "bar"}
393
- }
394
- ```
395
-
396
- *Aaron Gough*
397
-
398
- * Strip `break_sequence` at the end of `word_wrap`.
399
-
400
- This fixes a bug where `word_wrap` didn't properly strip off break sequences that had printable characters.
401
-
402
- For example, compare the outputs of this template:
403
-
404
- ```erb
405
- # <%= word_wrap("11 22\n33 44", line_width: 2, break_sequence: "\n# ") %>
406
- ```
194
+ # Raises ArgumentError: Invalid HTML5 tag name: 12p
195
+ content_tag("12p") # Starting with a number
407
196
 
408
- Before:
197
+ # Raises ArgumentError: Invalid HTML5 tag name: ""
198
+ content_tag("") # Empty tag name
409
199
 
410
- ```
411
- # 11
412
- # 22
413
- #
414
- # 33
415
- # 44
416
- #
417
- ```
200
+ # Raises ArgumentError: Invalid HTML5 tag name: div/
201
+ tag("div/") # Contains a solidus
418
202
 
419
- After:
420
-
421
- ```
422
- # 11
423
- # 22
424
- # 33
425
- # 44
203
+ # Raises ArgumentError: Invalid HTML5 tag name: "image file"
204
+ tag("image file") # Contains a space
426
205
  ```
427
206
 
428
- *Max Chernyak*
429
-
430
- * Allow templates to set strict `locals`.
431
-
432
- By default, templates will accept any `locals` as keyword arguments. To define what `locals` a template accepts, add a `locals` magic comment:
433
-
434
- ```erb
435
- <%# locals: (message:) -%>
436
- <%= message %>
437
- ```
438
-
439
- Default values can also be provided:
440
-
441
- ```erb
442
- <%# locals: (message: "Hello, world!") -%>
443
- <%= message %>
444
- ```
445
-
446
- Or `locals` can be disabled entirely:
447
-
448
- ```erb
449
- <%# locals: () %>
450
- ```
451
-
452
- *Joel Hawksley*
453
-
454
- * Add `include_seconds` option for `datetime_local_field`
455
-
456
- This allows to omit seconds part in the input field, by passing `include_seconds: false`
457
-
458
- *Wojciech Wnętrzak*
459
-
460
- * Guard against `ActionView::Helpers::FormTagHelper#field_name` calls with nil
461
- `object_name` arguments. For example:
462
-
463
- ```erb
464
- <%= fields do |f| %>
465
- <%= f.field_name :body %>
466
- <% end %>
467
- ```
468
-
469
- *Sean Doyle*
470
-
471
- * Strings returned from `strip_tags` are correctly tagged `html_safe?`
472
-
473
- Because these strings contain no HTML elements and the basic entities are escaped, they are safe
474
- to be included as-is as PCDATA in HTML content. Tagging them as html-safe avoids double-escaping
475
- entities when being concatenated to a SafeBuffer during rendering.
476
-
477
- Fixes [rails/rails-html-sanitizer#124](https://github.com/rails/rails-html-sanitizer/issues/124)
478
-
479
- *Mike Dalessio*
480
-
481
- * Move `convert_to_model` call from `form_for` into `form_with`
482
-
483
- Now that `form_for` is implemented in terms of `form_with`, remove the
484
- `convert_to_model` call from `form_for`.
485
-
486
- *Sean Doyle*
487
-
488
- * Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
489
-
490
- Escape dangerous characters in names of tags and names of attributes in the
491
- tag helpers, following the XML specification. Rename the option
492
- `:escape_attributes` to `:escape`, to simplify by applying the option to the
493
- whole tag.
494
-
495
- *Álvaro Martín Fraguas*
496
-
497
- * Extend audio_tag and video_tag to accept Active Storage attachments.
498
-
499
- Now it's possible to write
500
-
501
- ```ruby
502
- audio_tag(user.audio_file)
503
- video_tag(user.video_file)
504
- ```
505
-
506
- Instead of
507
-
508
- ```ruby
509
- audio_tag(polymorphic_path(user.audio_file))
510
- video_tag(polymorphic_path(user.video_file))
511
- ```
512
-
513
- `image_tag` already supported that, so this follows the same pattern.
514
-
515
- *Matheus Richard*
516
-
517
- * Ensure models passed to `form_for` attempt to call `to_model`.
518
-
519
- *Sean Doyle*
207
+ *Akhil G Krishnan*
520
208
 
521
- Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/actionview/CHANGELOG.md) for previous changes.
209
+ Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actionview/CHANGELOG.md) for previous changes.
data/README.rdoc CHANGED
@@ -35,6 +35,6 @@ Bug reports for the Ruby on \Rails project can be filed here:
35
35
 
36
36
  * https://github.com/rails/rails/issues
37
37
 
38
- Feature requests should be discussed on the rails-core mailing list here:
38
+ Feature requests should be discussed on the rubyonrails-core forum here:
39
39
 
40
40
  * https://discuss.rubyonrails.org/c/rubyonrails-core