Specifically strip mentions for search indexing

This commit is contained in:
Ekaterina Vaartis 2022-08-27 01:43:59 +03:00
commit 5a39866388
3 changed files with 27 additions and 1 deletions

View file

@ -13,6 +13,7 @@ defmodule Mix.Tasks.Pleroma.Search.Meilisearch do
def run(["index"]) do
start_pleroma()
Pleroma.HTML.compile_scrubbers()
meili_version =
(

View file

@ -122,7 +122,8 @@ defmodule Pleroma.Search.Meilisearch do
end
content =
with {:ok, scrubbed} <- FastSanitize.strip_tags(content_str),
with {:ok, scrubbed} <-
FastSanitize.Sanitizer.scrub(content_str, Pleroma.HTML.Scrubber.SearchIndexing),
trimmed <- String.trim(scrubbed) do
trimmed
end