Commit a8a24213 authored by kaniini's avatar kaniini

fragment: empty lists are a special atom, so do an equality comparison

parent b00389b0
Pipeline #19425 failed with stage
in 1 minute and 55 seconds
......@@ -23,7 +23,7 @@ defmodule FastSanitize.Fragment do
defp build_start_tag(tag, attrs, nil), do: ["<", to_string(tag), build_attr_chunks(attrs), "/>"]
defp build_start_tag(tag, attrs, _children) when length(attrs) == 0,
defp build_start_tag(tag, attrs, _children) when attrs == [],
do: ["<", to_string(tag), ">"]
defp build_start_tag(tag, attrs, _children),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment