From 74b06d704d3825520c88833bbaffd6bbf8bf7fe6 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Thu, 7 Dec 2023 21:07:08 +0100 Subject: [PATCH] Actually remove code blocks from search index Closes #2065 --- components/search/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/search/src/lib.rs b/components/search/src/lib.rs index c905c3f93d..073eb09307 100644 --- a/components/search/src/lib.rs +++ b/components/search/src/lib.rs @@ -14,12 +14,10 @@ static AMMONIA: Lazy> = Lazy::new(|| { let mut clean_content = HashSet::new(); clean_content.insert("script"); clean_content.insert("style"); - let mut rm_tags = HashSet::new(); - rm_tags.insert("pre"); + clean_content.insert("pre"); let mut builder = ammonia::Builder::new(); builder .tags(HashSet::new()) - .rm_tags(rm_tags) .tag_attributes(HashMap::new()) .generic_attributes(HashSet::new()) .link_rel(None) @@ -89,7 +87,6 @@ fn fill_index( row.push(body); }; } - row }