81b49f55bf
* Properly escaped NFO file contents * Added an NFO backfill worker * Added a try-catch to the backfill since I _really_ don't want failures to halt app boot
18 lines
324 B
Elixir
18 lines
324 B
Elixir
defmodule Pinchflat.Utils.XmlUtils do
|
|
@moduledoc """
|
|
Utility methods for working with XML documents
|
|
"""
|
|
|
|
@doc """
|
|
Escapes invalid XML characters in a string
|
|
|
|
Returns binary()
|
|
"""
|
|
def safe(value) do
|
|
value
|
|
|> to_string()
|
|
|> Phoenix.HTML.html_escape()
|
|
|> Phoenix.HTML.safe_to_string()
|
|
end
|
|
end
|