allow data-mfm

This commit is contained in:
Henry Jameson 2025-06-25 16:11:39 +03:00
commit 03033e81d7

View file

@ -41,6 +41,7 @@ defmodule Pleroma.HTML.Scrubber.Default do
# sort(1)-ed list
Meta.allow_tag_with_these_attributes(:bdi, [])
Meta.allow_tag_with_these_attributes(:center, [])
Meta.allow_tag_with_these_attributes(:bdo, ["dir"])
Meta.allow_tag_with_these_attributes(:big, ["lang"])
Meta.allow_tag_with_these_attributes(:b, ["lang"])
@ -80,9 +81,33 @@ defmodule Pleroma.HTML.Scrubber.Default do
Meta.allow_tag_with_this_attribute_values(:span, "class", [
"h-card",
"recipients-inline",
"quote-inline"
"quote-inline",
"mfm",
"_mfm_tada_",
"_mfm_jelly_",
"_mfm_twitch_",
"_mfm_shake_",
"_mfm_spin_",
"_mfm_jump_",
"_mfm_bounce_",
"_mfm_flip_",
"_mfm_x2_",
"_mfm_x3_",
"_mfm_x4_",
"_mfm_blur_",
"_mfm_rainbow_",
"_mfm_rotate_"
])
Meta.allow_tag_with_these_attributes(:span, [
"data-x",
"data-y",
"data-h",
"data-v",
"data-left",
"data-right"
]) ])
Meta.allow_tag_with_these_attributes(:span, ["lang"])
Meta.allow_tag_with_this_attribute_values(:code, "class", ["inline"])