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 tafia#739
  • Loading branch information
Mingun committed Jun 26, 2024
1 parent 9772cc6 commit bd6a1db
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 @@
`InvalidCharRef` variant with a standard `ParseIntError` inside:
- `InvalidDecimal`
- `InvalidHexadecimal`
- [#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 bd6a1db

Please sign in to comment.