2022-06-15 12:32:16 +00:00
|
|
|
* Guard against `ActionView::Helpers::FormTagHelper#field_name` calls with nil
|
|
|
|
`object_name` arguments. For example:
|
|
|
|
|
|
|
|
```erb
|
|
|
|
<%= fields do |f| %>
|
|
|
|
<%= f.field_name :body %>
|
|
|
|
<% end %>
|
|
|
|
```
|
|
|
|
|
|
|
|
*Sean Doyle*
|
|
|
|
|
2022-05-30 15:10:17 +00:00
|
|
|
* Strings returned from `strip_tags` are correctly tagged `html_safe?`
|
|
|
|
|
|
|
|
Because these strings contain no HTML elements and the basic entities are escaped, they are safe
|
|
|
|
to be included as-is as PCDATA in HTML content. Tagging them as html-safe avoids double-escaping
|
|
|
|
entities when being concatenated to a SafeBuffer during rendering.
|
|
|
|
|
|
|
|
Fixes [rails/rails-html-sanitizer#124](https://github.com/rails/rails-html-sanitizer/issues/124)
|
|
|
|
|
|
|
|
*Mike Dalessio*
|
|
|
|
|
2022-02-17 20:53:09 +00:00
|
|
|
* Move `convert_to_model` call from `form_for` into `form_with`
|
|
|
|
|
|
|
|
Now that `form_for` is implemented in terms of `form_with`, remove the
|
|
|
|
`convert_to_model` call from `form_for`.
|
|
|
|
|
|
|
|
*Sean Doyle*
|
|
|
|
|
2022-01-05 15:37:54 +00:00
|
|
|
* Fix and add protections for XSS in `ActionView::Helpers` and `ERB::Util`.
|
|
|
|
|
|
|
|
Escape dangerous characters in names of tags and names of attributes in the
|
|
|
|
tag helpers, following the XML specification. Rename the option
|
|
|
|
`:escape_attributes` to `:escape`, to simplify by applying the option to the
|
|
|
|
whole tag.
|
|
|
|
|
|
|
|
*Álvaro Martín Fraguas*
|
|
|
|
|
2022-01-05 19:06:52 +00:00
|
|
|
* Extend audio_tag and video_tag to accept Active Storage attachments.
|
|
|
|
|
|
|
|
Now it's possible to write
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
audio_tag(user.audio_file)
|
|
|
|
video_tag(user.video_file)
|
|
|
|
```
|
|
|
|
|
|
|
|
Instead of
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
audio_tag(polymorphic_path(user.audio_file))
|
|
|
|
video_tag(polymorphic_path(user.video_file))
|
|
|
|
```
|
|
|
|
|
|
|
|
`image_tag` already supported that, so this follows the same pattern.
|
|
|
|
|
|
|
|
*Matheus Richard*
|
|
|
|
|
2022-02-03 19:05:48 +00:00
|
|
|
* Ensure models passed to `form_for` attempt to call `to_model`.
|
2021-10-09 01:36:49 +00:00
|
|
|
|
2022-02-03 19:05:48 +00:00
|
|
|
*Sean Doyle*
|
2021-10-09 01:36:49 +00:00
|
|
|
|
2021-12-07 15:52:30 +00:00
|
|
|
Please check [7-0-stable](https://github.com/rails/rails/blob/7-0-stable/actionview/CHANGELOG.md) for previous changes.
|