View Source Mobilizon.Service.Formatter.HTML (Mobilizon v4.1.0-alpha.1)

Service to filter tags out of HTML content.

Summary

Functions

See FastSanitize.basic_html/1.

Link to this function

filter_tags_for_oembed(html)

View Source
@spec html_to_text(String.t() | nil) :: String.t() | nil
@spec strip_tags(String.t()) :: String.t() | no_return()
Link to this function

strip_tags_and_insert_spaces(html)

View Source
@spec strip_tags_and_insert_spaces(String.t()) :: String.t()

Inserts a space before tags closing so that words are not attached once tags stripped

<h1>test</h1>next thing becomes test next instead of testnext