Compare commits

...

2 Commits

Author SHA1 Message Date
0f1a60a348 Sanitize html when linkifying plain text. 2024-02-03 11:15:57 -08:00
c59a883351 Address lint. 2024-02-03 11:14:43 -08:00
2 changed files with 5 additions and 6 deletions

View File

@ -1,11 +1,10 @@
use std::{
error::Error,
io::{stdout, Write},
time::{Duration, Instant},
time::Instant,
};
use itertools::Itertools;
use notmuch::{Notmuch, NotmuchError, SearchSummary, ThreadSet};
use notmuch::Notmuch;
use rayon::iter::{ParallelBridge, ParallelIterator};
#[test]
@ -27,7 +26,7 @@ fn parse_one() -> Result<(), Box<dyn Error>> {
.enumerate()
.par_bridge()
.for_each(|(i, msg)| {
let ts = nm
let _ts = nm
.show(&msg)
.expect(&format!("failed to show msg: {}", msg));
//println!("{:?}", ts);
@ -79,7 +78,7 @@ fn parse_bulk() -> Result<(), Box<dyn Error>> {
//.par_bridge()
.for_each(|(i, msgs)| {
let query = msgs.join(" OR ");
let ts = nm
let _ts = nm
.show(&query)
.expect(&format!("failed to show msgs: {}", query));
//println!("{:?}", ts);

View File

@ -350,7 +350,7 @@ impl QueryRoot {
Body::PlainText(PlainText { text, content_tree }) => Body::Html(Html {
html: format!(
r#"<p class="view-part-text-plain">{}</p>"#,
linkify_html(&text)
sanitize_html(&linkify_html(&text))?
),
content_tree: if debug_content_tree {
render_content_type_tree(&m)