You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Monkey patching it to the following appears to solve it for now:
classSelectedListInput < ActiveAdminAddons::InputBasedefrender_control_wrappertemplate.content_tag(:div,class: "selected-list-container")dotemplate.content_tag(:label)#patch to ensure no html is passedtemplate.concat(render_items_list)template.concat(builder.select(build_virtual_attr,[],{},input_html_options))endendend
The same would apply for the other input types
The text was updated successfully, but these errors were encountered:
Rails 7.2 added some logic to validate HTML5 when rendering. As it turns
out, activeadmin_addons has an invalid call to `content_tag`.
This is the error shown when rendering a page that uses a "selected list"
input field:
```
ActionView::Template::Error:
Invalid HTML5 tag name: "<label for=\"company_talent_ids\" class=\"label\">Presented talents</label>"
# .../gems/actionview-7.2.1/lib/action_view/helpers/tag_helper.rb:589:in `ensure_valid_html5_tag_name'
# .../gems/actionview-7.2.1/lib/action_view/helpers/tag_helper.rb:530:in `content_tag'
# .../bundler/gems/activeadmin_addons-32295448e739/app/inputs/selected_list_input.rb:29:in `block in render_control_wrapper'
# .../gems/actionview-7.2.1/lib/action_view/helpers/capture_helper.rb:50:in `block in capture'
# .../gems/actionview-7.2.1/lib/action_view/buffers.rb:75:in `capture'
# .../gems/actionview-7.2.1/lib/action_view/helpers/capture_helper.rb:50:in `capture'
# .../gems/actionview-7.2.1/lib/action_view/helpers/tag_helper.rb:534:in `content_tag'
# .../bundler/gems/activeadmin_addons-32295448e739/app/inputs/selected_list_input.rb:28:in `render_control_wrapper'
# .../bundler/gems/activeadmin_addons-32295448e739/app/inputs/selected_list_input.rb:4:in `render_custom_input'
# .../bundler/gems/activeadmin_addons-32295448e739/lib/activeadmin_addons/support/input_base.rb:14:in `to_html'
# .../bundler/gems/activeadmin_addons-32295448e739/lib/activeadmin_addons/support/enumerize_formtastic_support.rb:13:in `input'
# .../gems/arbre-1.7.0/lib/arbre/rails/forms.rb:31:in `proxy_call_to_form'
# .../gems/activeadmin-3.2.5/lib/active_admin/views/components/active_admin_form.rb:72:in `input'
```
see platanus#502
Describe the bug
After upgrading Rails/ActionView to v7.2 an exception started to be raised, during test execution as well as in the UI:
To Reproduce
Steps to reproduce the behavior:
selected_list
Expected behavior
It renders the select field as it did before on Rails 7.1.3.4
Screenshots
Additional context
ensure_valid_html5_tag_name
<label for="scope_field_name" class="label">Entity</label>
as thelabel_html
valueactiveadmin_addons/app/inputs/selected_list_input.rb
Line 29 in cf71013
The text was updated successfully, but these errors were encountered: