server: extract image title and alt attributes into figure captions

This commit is contained in:
2024-08-31 14:43:04 -07:00
parent f77d0776c4
commit 548b5a0ab0
2 changed files with 37 additions and 2 deletions

View File

@@ -15,7 +15,8 @@ use crate::{
compute_offset_limit,
error::ServerError,
graphql::{Body, Email, Html, Message, NewsPost, Tag, Thread, ThreadSummary},
AddOutlink, EscapeHtml, InlineStyle, SanitizeHtml, SlurpContents, StripHtml, Transformer,
AddOutlink, EscapeHtml, FrameImages, InlineStyle, SanitizeHtml, SlurpContents, StripHtml,
Transformer,
};
pub fn is_newsreader_search(query: &str) -> bool {
@@ -193,6 +194,7 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
],
],
}),
Box::new(FrameImages),
Box::new(AddOutlink),
Box::new(EscapeHtml),
Box::new(InlineStyle),