Fix quotes escaping img alt attrs

This commit is contained in:
august kline 2025-01-06 19:15:11 -05:00
parent 892b2082c1
commit cb6e666a6e
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ impl Block {
] ]
.concat(), .concat(),
Block::image { file, caption } => { Block::image { file, caption } => {
["<img src=\"", &file.url, "\" alt=\"", caption, "\"/>"].concat() ["<img src=\"", &file.url, "\" alt=\"", &caption.replace(r#"""#, "&quot;").replace("<br>", ""), "\"/>"].concat()
} }
Block::delimiter {} => "<div style=\"inline-size: 100%; block-size: 1px; background: var(--color-text)\"></div>".to_string(), Block::delimiter {} => "<div style=\"inline-size: 100%; block-size: 1px; background: var(--color-text)\"></div>".to_string(),