server: add link to news posts back to original article
This commit is contained in:
@@ -13,7 +13,7 @@ use crate::{
|
||||
compute_offset_limit,
|
||||
error::ServerError,
|
||||
graphql::{Body, Email, Html, Message, Tag, Thread, ThreadSummary},
|
||||
EscapeHtml, InlineStyle, SanitizeHtml, StripHtml, Transformer,
|
||||
AddOutlink, EscapeHtml, InlineStyle, SanitizeHtml, StripHtml, Transformer,
|
||||
};
|
||||
|
||||
pub fn is_newsreader_search(query: &str) -> bool {
|
||||
@@ -191,7 +191,8 @@ pub async fn thread(pool: &PgPool, thread_id: String) -> Result<Thread, ServerEr
|
||||
// TODO: add site specific cleanups. For example:
|
||||
// * Grafana does <div class="image-wrapp"><img class="lazyload>"<img src="/media/...>"</img></div>
|
||||
// * Some sites appear to be HTML encoded, unencode them, i.e. imperialviolent
|
||||
let body_tranformers: Vec<Box<dyn Transformer>> = vec![
|
||||
let mut body_tranformers: Vec<Box<dyn Transformer>> = vec![
|
||||
Box::new(AddOutlink(link.clone())),
|
||||
Box::new(EscapeHtml),
|
||||
Box::new(InlineStyle),
|
||||
Box::new(SanitizeHtml {
|
||||
|
||||
Reference in New Issue
Block a user