fix form fields import

This commit is contained in:
Pete Matsyburka
2025-09-17 13:26:58 +03:00
parent 6e16f81fc6
commit 634b5c37ba
+4 -1
View File
@@ -225,7 +225,10 @@ module Templates
is_option_number = option.is_a?(Symbol) && option.to_s.match?(/\A\d+\z/)
option = option[1] if option.is_a?(Array) && option.size == 2
option = option.encode('utf-8', invalid: :replace, undef: :replace, replace: '') if option.is_a?(String)
if option.is_a?(String) || option.is_a?(Symbol)
option = option.to_s.encode('utf-8', invalid: :replace, undef: :replace, replace: '')
end
next if type == 'select' && option.to_s.match?(SELECT_PLACEHOLDER_REGEXP)