Skip to content

Commit

Permalink
Treat empty strings as safe in raw
Browse files Browse the repository at this point in the history
  • Loading branch information
willcosgrove committed Sep 9, 2024
1 parent 576a340 commit b41789b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phlex/sgml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def raw(content)
return if context.fragments && !context.in_target_fragment

context.buffer << content.to_s
when nil # do nothing
when nil, "" # do nothing
else
raise Phlex::ArgumentError.new("You passed an unsafe object to `raw`.")
end
Expand Down

0 comments on commit b41789b

Please sign in to comment.