From a9b456dbde88aaed474ba87854215353de957677 Mon Sep 17 00:00:00 2001 From: MarkNahabedian Date: Sun, 10 May 2026 10:38:36 -0400 Subject: [PATCH] escape should work with AbstractString. Unit tests pass. --- src/XML.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XML.jl b/src/XML.jl index 273bfda..1ce7f20 100644 --- a/src/XML.jl +++ b/src/XML.jl @@ -20,7 +20,7 @@ function unescape(x::AbstractString) end return result end -function escape(x::String) +function escape(x::AbstractString) result = replace(x, r"&(?!amp;|quot;|apos;|gt;|lt;)" => "&") for (pat, r) in escape_chars[2:end] result = replace(result, pat => r)