class Phlex::SGML

def __build_attributes__(attributes, buffer:)

Other tags:
    Api: - private
def __build_attributes__(attributes, buffer:)
tes.each do |k, v|
nless v
 case k
String then k
Symbol then k.name.tr("_", "-")
k.to_s
name = name.downcase
f lower_name == "href" && v.to_s.downcase.tr("\t \n", "").start_with?("javascript:")
ct unsafe attribute names. Attribute names are considered unsafe if they match an event attribute or include unsafe characters.
L::EVENT_ATTRIBUTES[lower_name] || name.match?(/[<>&"']/)
 ArgumentError, "Unsafe attribute name detected: #{k}."

rue
r << " " << name
tring
r << " " << name << '="' << ERB::Escape.html_escape(v) << '"'
ymbol
r << " " << name << '="' << ERB::Escape.html_escape(v.name) << '"'
ash
ld_attributes__(
ansform_keys { |subkey|
e subkey
en Symbol then"#{k}-#{subkey.name.tr('_', '-')}"
se "#{k}-#{subkey}"

uffer: buffer
r << " " << name << '="' << ERB::Escape.html_escape(v.to_s) << '"'