Skip to content

Commit

Permalink
Fix Attribute::unescape_value does not unescape predefined entities s…
Browse files Browse the repository at this point in the history
…ince #739
  • Loading branch information
Mingun committed Jun 28, 2024
1 parent aa1d391 commit 0315ed0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,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

Expand Down
2 changes: 1 addition & 1 deletion src/events/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl<'a> Attribute<'a> {
/// [`encoding`]: ../../index.html#encoding
#[cfg(any(doc, not(feature = "encoding")))]
pub fn unescape_value(&self) -> XmlResult<Cow<'a, str>> {
self.unescape_value_with(|_| None)
self.unescape_value_with(resolve_predefined_entity)
}

/// Decodes using UTF-8 then unescapes the value, using custom entities.
Expand Down

0 comments on commit 0315ed0

Please sign in to comment.