Skip to content

Commit

Permalink
should mark js code as html_safe
Browse files Browse the repository at this point in the history
  • Loading branch information
dscataglini committed Jul 30, 2024
1 parent de72c30 commit 744ed6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/opal_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def opal_tag(opal_code_or_options = nil, html_options = {}, &block)
compiler = Opal::Compiler.new(opal_code_or_options, compiler_options)
js_code = compiler.compile
javascript_tag html_options do
js_code
js_code.html_safe
end
end

Expand Down

0 comments on commit 744ed6b

Please sign in to comment.