From 03033e81d7d2f6b78738e5de058f487aa5ceb476 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 25 Jun 2025 16:11:39 +0300 Subject: [PATCH] allow data-mfm --- priv/scrubbers/default.ex | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/priv/scrubbers/default.ex b/priv/scrubbers/default.ex index dad9dc1a1..e0dac11da 100644 --- a/priv/scrubbers/default.ex +++ b/priv/scrubbers/default.ex @@ -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"])