mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-05 16:39:47 +00:00
B Preload: Make sure that the preloaded json is html safe
This commit is contained in:
parent
e8d3525665
commit
cbc5b8cebd
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ defmodule Pleroma.Web.Preload do
|
|||
terms =
|
||||
params
|
||||
|> parser.generate_terms()
|
||||
|> Enum.map(fn {k, v} -> {k, Base.encode64(Jason.encode!(v))} end)
|
||||
|> Enum.map(fn {k, v} -> {k, Base.encode64(Jason.encode!(v, escape: :html_safe))} end)
|
||||
|> Enum.into(%{})
|
||||
|
||||
Map.merge(acc, terms)
|
||||
|
@ -19,7 +19,7 @@ defmodule Pleroma.Web.Preload do
|
|||
|
||||
rendered_html =
|
||||
preload_data
|
||||
|> Jason.encode!()
|
||||
|> Jason.encode!(escape: :html_safe)
|
||||
|> build_script_tag()
|
||||
|> HTML.safe_to_string()
|
||||
|
||||
|
|
Loading…
Reference in a new issue