html: escape img src values
This commit is contained in:
parent
5768b24907
commit
fc374be56c
1 changed files with 4 additions and 4 deletions
|
@ -361,11 +361,11 @@ impl<'s, I: Iterator<Item = Event<'s>>, W: std::fmt::Write> Writer<'s, I, W> {
|
||||||
Container::Link(..) => self.out.write_str("</a>")?,
|
Container::Link(..) => self.out.write_str("</a>")?,
|
||||||
Container::Image(src, ..) => {
|
Container::Image(src, ..) => {
|
||||||
self.text_only = false;
|
self.text_only = false;
|
||||||
if src.is_empty() {
|
if !src.is_empty() {
|
||||||
self.out.write_str(r#"">"#)?;
|
self.out.write_str(r#"" src=""#)?;
|
||||||
} else {
|
self.write_attr(&src)?;
|
||||||
write!(self.out, r#"" src="{}">"#, src)?;
|
|
||||||
}
|
}
|
||||||
|
self.out.write_str(r#"">"#)?;
|
||||||
}
|
}
|
||||||
Container::Verbatim => self.out.write_str("</code>")?,
|
Container::Verbatim => self.out.write_str("</code>")?,
|
||||||
Container::Math { display } => {
|
Container::Math { display } => {
|
||||||
|
|
Loading…
Reference in a new issue