meta tag parser respect first title header

This commit is contained in:
Alexander Strizhakov 2020-01-28 19:29:27 +03:00
commit 7bd4c14581
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
3 changed files with 2915 additions and 1 deletions

View file

@ -48,6 +48,6 @@ defmodule Pleroma.Web.RichMedia.Parsers.MetaTagsParser do
defp maybe_put_title(meta, _), do: meta
defp get_page_title(html) do
Floki.find(html, "title") |> Floki.text()
Floki.find(html, "title") |> List.first() |> Floki.text()
end
end