Make Floki use fast_html

This commit is contained in:
rinpatch 2020-02-11 00:29:25 +03:00
commit ea1631d7e6
7 changed files with 30 additions and 13 deletions

View file

@ -108,6 +108,7 @@ defmodule Pleroma.HTML do
Cachex.fetch!(:scrubber_cache, key, fn _key ->
result =
content
|> Floki.parse_fragment!()
|> Floki.filter_out("a.mention,a.hashtag,a[rel~=\"tag\"]")
|> Floki.attribute("a", "href")
|> Enum.at(0)