From 613a6bb0bab7ee5a8e0df1fafa05c6f469367a6b Mon Sep 17 00:00:00 2001 From: Mingun Date: Wed, 26 Jun 2024 20:55:06 +0500 Subject: [PATCH] Fix Attribute::unescape_value does not unescape predefined entities since #739 --- Changelog.md | 1 + src/events/attributes.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index c0dabb60..d744e759 100644 --- a/Changelog.md +++ b/Changelog.md @@ -21,6 +21,7 @@ As a result, the following variants of `quick_xml::escape::EscapeError` are removed: - `TooLongDecimal` - `TooLongHexadecimal` +- [#771]: Fixed `Attribute::unescape_value` which does not unescape predefined values since 0.32.0. ### Misc Changes diff --git a/src/events/attributes.rs b/src/events/attributes.rs index aa765b46..4a2a34ab 100644 --- a/src/events/attributes.rs +++ b/src/events/attributes.rs @@ -45,7 +45,7 @@ impl<'a> Attribute<'a> { /// [`encoding`]: ../../index.html#encoding #[cfg(any(doc, not(feature = "encoding")))] pub fn unescape_value(&self) -> XmlResult> { - self.unescape_value_with(|_| None) + self.unescape_value_with(resolve_predefined_entity) } /// Decodes using UTF-8 then unescapes the value, using custom entities.