File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,13 @@ nav_order: 5
1010
1111## main
1212
13+ * Fix html escaping in ` #call ` for non-strings.
14+
15+ * Reegan Viljoen, Cameron Dutro*
16+
1317* Add ` output_preamble ` to match ` output_postamble ` , using the same safety checks.
1418
15- * Kali Donovan*
16- * Michael Daross*
19+ * Kali Donovan, Michael Daross*
1720
1821* Exclude html escaping of I18n reserved keys with ` I18n::RESERVED_KEYS ` rather than ` I18n.reserved_keys_pattern ` .
1922
Original file line number Diff line number Diff line change @@ -318,7 +318,7 @@ def content_evaluated?
318318
319319 def maybe_escape_html ( text )
320320 return text if request && !request . format . html?
321- return text if text . nil? || text . empty ?
321+ return text if text . blank ?
322322
323323 if text . html_safe?
324324 text
Original file line number Diff line number Diff line change 1+ class InlineIntegerComponent < ViewComponent ::Base
2+ def call
3+ 1
4+ end
5+ end
Original file line number Diff line number Diff line change @@ -752,4 +752,10 @@ def test_slot_names_can_start_with_call
752752 end
753753 end
754754 end
755+
756+ def test_inline_html_escape_with_integer
757+ assert_nothing_raised do
758+ render_inline InlineIntegerComponent . new
759+ end
760+ end
755761end
You can’t perform that action at this time.
0 commit comments