From b41789bf7c6a2eeb842be14ee16a793b45641be4 Mon Sep 17 00:00:00 2001 From: Will Cosgrove Date: Mon, 9 Sep 2024 11:49:11 -0500 Subject: [PATCH] Treat empty strings as safe in `raw` --- lib/phlex/sgml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/phlex/sgml.rb b/lib/phlex/sgml.rb index c4b0b7b7..6f325814 100644 --- a/lib/phlex/sgml.rb +++ b/lib/phlex/sgml.rb @@ -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