html: escape quotes in img alt text

This commit is contained in:
Noah Hellman 2023-03-12 11:05:37 +01:00
parent bd831058f7
commit 5768b24907

View file

@ -388,6 +388,7 @@ impl<'s, I: Iterator<Item = Event<'s>>, W: std::fmt::Write> Writer<'s, I, W> {
} }
} }
Event::Str(s) => match self.raw { Event::Str(s) => match self.raw {
Raw::None if self.text_only => self.write_attr(&s)?,
Raw::None => self.write_text(&s)?, Raw::None => self.write_text(&s)?,
Raw::Html => self.out.write_str(&s)?, Raw::Html => self.out.write_str(&s)?,
Raw::Other => {} Raw::Other => {}