mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
minidom: never parse literal angle brackets as text or attribute value
This commit is contained in:
parent
f01629a47a
commit
67b24e5646
1 changed files with 6 additions and 1 deletions
|
@ -218,7 +218,12 @@ impl Token {
|
||||||
Ok((s, Cow::from(format!("{}", c))))
|
Ok((s, Cow::from(format!("{}", c))))
|
||||||
}, |s| {
|
}, |s| {
|
||||||
let (s, _) = not(peek(char(until)))(s)?;
|
let (s, _) = not(peek(char(until)))(s)?;
|
||||||
let (s, text) = take_while1(|b| b != until as u8 && b != b'&')(s)?;
|
let (s, text) = take_while1(|b|
|
||||||
|
b != until as u8 &&
|
||||||
|
b != b'&' &&
|
||||||
|
b != b'<' &&
|
||||||
|
b != b'>'
|
||||||
|
)(s)?;
|
||||||
let text = Self::str_from_utf8(text)?;
|
let text = Self::str_from_utf8(text)?;
|
||||||
let text = Self::normalize_newlines(text);
|
let text = Self::normalize_newlines(text);
|
||||||
Ok((s, text))
|
Ok((s, text))
|
||||||
|
|
Loading…
Reference in a new issue