1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-22 16:03:25 +00:00
mobilizon/lib/service/metadata/metadata.ex
Thomas Citharel 15a82c7bce
[Metadata] Fix actors not sanitizing their description and refactor
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-17 15:45:08 +01:00

13 lines
397 B
Elixir

defprotocol Mobilizon.Service.Metadata do
@moduledoc """
Service that allows producing metadata HTML tags about content
"""
@doc """
Build tags for an entity. Returns a list of `t:Phoenix.HTML.safe/0` tags.
Locale can be provided to generate fallback descriptions.
"""
@spec build_tags(any(), String.t()) :: list(Phoenix.HTML.safe())
def build_tags(entity, locale \\ "en")
end