You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing the string "><" produces Event::Text(BytesText { content: Borrowed(">") }) followed by Event::Eof. However, this is an invalid XML string, and should result in some kind of error (or detectable error condition).
Reproduction:
use quick_xml::Reader;use quick_xml::events::Event;fnmain(){letmut reader = Reader::from_str("><");
reader.trim_text(true);loop{let event = reader.read_event().expect("Failed to read event");eprintln!("Event: {event:?}");ifletEvent::Eof = event {break;}}}
To be clear: error here is only in emitting Event::Eof instead raising error about incomplete markup. > in the beginning correctly recognized as a text, because the only symbols that MUST be escaped in text in XML is < and & (see definition of CharData)
Parsing the string "><" produces
Event::Text(BytesText { content: Borrowed(">") })
followed byEvent::Eof
. However, this is an invalid XML string, and should result in some kind of error (or detectable error condition).Reproduction:
outputs:
The text was updated successfully, but these errors were encountered: