Use floki's new APIs for parsing fragments
This commit is contained in:
parent
0b5a2bbe5b
commit
472132215e
8 changed files with 121 additions and 106 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue