Inline mvp and custom override CSS when rendering RSS posts
This commit is contained in:
@@ -14,7 +14,7 @@ const THREAD_PREFIX: &'static str = "news:";
|
||||
use crate::{
|
||||
error::ServerError,
|
||||
graphql::{Body, Email, Html, Message, Tag, Thread, ThreadSummary},
|
||||
EscapeHtml, SanitizeHtml, Transformer,
|
||||
EscapeHtml, InlineStyle, SanitizeHtml, Transformer,
|
||||
};
|
||||
|
||||
pub fn is_newsreader_search(query: &str) -> bool {
|
||||
@@ -213,6 +213,7 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
|
||||
// * Some sites appear to be HTML encoded, unencode them, i.e. imperialviolent
|
||||
let tranformers: Vec<Box<dyn Transformer>> = vec![
|
||||
Box::new(EscapeHtml),
|
||||
Box::new(InlineStyle),
|
||||
Box::new(SanitizeHtml {
|
||||
cid_prefix: "",
|
||||
base_url: &link,
|
||||
@@ -224,7 +225,7 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
|
||||
}
|
||||
}
|
||||
let body = Body::Html(Html {
|
||||
html: html.to_string(),
|
||||
html,
|
||||
content_tree: "".to_string(),
|
||||
});
|
||||
let title = r.title.unwrap_or("NO TITLE".to_string());
|
||||
|
||||
Reference in New Issue
Block a user