Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@

### Bug Fixes

- [#597]: Fixed incorrect processing of namespace scopes in `NsReader::read_to_end`.
The scope started by a start element was not ended after that call.

### Misc Changes

[#597]: https://github.com/tafia/quick-xml/issues/597


## 0.39.0 -- 2026-01-11

Expand Down
6 changes: 5 additions & 1 deletion src/reader/async_tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ impl<R: AsyncBufRead + Unpin> NsReader<R> {
) -> Result<Span> {
// According to the https://www.w3.org/TR/xml11/#dt-etag, end name should
// match literally the start name. See `Config::check_end_names` documentation
self.reader.read_to_end_into_async(end, buf).await
let result = self.reader.read_to_end_into_async(end, buf).await?;
// read_to_end_into_async will consume closing tag. Because nobody can access to its
// content anymore, we directly pop namespace of the opening tag
self.ns_resolver.pop();
Ok(result)
}

/// An asynchronous version of [`read_resolved_event_into()`]. Reads the next
Expand Down
Loading
Loading