diff options
author | lain <lain@soykaf.club> | 2023-12-10 12:18:22 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2023-12-10 12:18:22 +0000 |
commit | a7f82ff82e400cca040c177f6f0186f840a8aa71 (patch) | |
tree | 4b866987b910ca5909bc33396b7f5be44bf2212c | |
parent | a67fc30d817e371face86ae6673d11d4854380c9 (diff) | |
parent | 06c58bce003cf2d9928c250f395349bd91c3225a (diff) | |
download | pleroma-a7f82ff82e400cca040c177f6f0186f840a8aa71.tar.gz pleroma-a7f82ff82e400cca040c177f6f0186f840a8aa71.zip |
Merge branch 'scrubbers-html4-GtS' into 'develop'
scrubbers/default: Add more formatting elements from HTML4 / GoToSocial
See merge request pleroma/pleroma!3979
-rw-r--r-- | changelog.d/scrubbers-html4-GtS.add | 1 | ||||
-rw-r--r-- | priv/scrubbers/default.ex | 27 |
2 files changed, 22 insertions, 6 deletions
diff --git a/changelog.d/scrubbers-html4-GtS.add b/changelog.d/scrubbers-html4-GtS.add new file mode 100644 index 000000000..7f99dbb25 --- /dev/null +++ b/changelog.d/scrubbers-html4-GtS.add @@ -0,0 +1 @@ +- scrubbers/default: Add more formatting elements from HTML4 / GoToSocial (acronym, bdo, big, cite, dfn, ins, kbd, q, samp, s, tt, var, wbr) diff --git a/priv/scrubbers/default.ex b/priv/scrubbers/default.ex index 24a76263b..a75a6465d 100644 --- a/priv/scrubbers/default.ex +++ b/priv/scrubbers/default.ex @@ -36,30 +36,45 @@ defmodule Pleroma.HTML.Scrubber.Default do Meta.allow_tag_with_these_attributes(:a, ["name", "title", "lang"]) Meta.allow_tag_with_these_attributes(:abbr, ["title", "lang"]) + Meta.allow_tag_with_these_attributes(:acronym, ["title", "lang"]) - Meta.allow_tag_with_these_attributes(:b, ["lang"]) + # sort(1)-ed list Meta.allow_tag_with_these_attributes(:bdi, []) + Meta.allow_tag_with_these_attributes(:bdo, ["dir"]) + Meta.allow_tag_with_these_attributes(:big, ["lang"]) + Meta.allow_tag_with_these_attributes(:b, ["lang"]) Meta.allow_tag_with_these_attributes(:blockquote, ["lang"]) Meta.allow_tag_with_these_attributes(:br, ["lang"]) + Meta.allow_tag_with_these_attributes(:cite, ["lang"]) Meta.allow_tag_with_these_attributes(:code, ["lang"]) Meta.allow_tag_with_these_attributes(:del, ["lang"]) + Meta.allow_tag_with_these_attributes(:dfn, ["lang"]) Meta.allow_tag_with_these_attributes(:em, ["lang"]) Meta.allow_tag_with_these_attributes(:hr, ["lang"]) Meta.allow_tag_with_these_attributes(:i, ["lang"]) + Meta.allow_tag_with_these_attributes(:ins, ["lang"]) + Meta.allow_tag_with_these_attributes(:kbd, ["lang"]) Meta.allow_tag_with_these_attributes(:li, ["lang"]) Meta.allow_tag_with_these_attributes(:ol, ["lang"]) Meta.allow_tag_with_these_attributes(:p, ["lang"]) Meta.allow_tag_with_these_attributes(:pre, ["lang"]) - Meta.allow_tag_with_these_attributes(:strong, ["lang"]) - Meta.allow_tag_with_these_attributes(:sub, ["lang"]) - Meta.allow_tag_with_these_attributes(:sup, ["lang"]) - Meta.allow_tag_with_these_attributes(:ruby, ["lang"]) + Meta.allow_tag_with_these_attributes(:q, ["lang"]) Meta.allow_tag_with_these_attributes(:rb, ["lang"]) Meta.allow_tag_with_these_attributes(:rp, ["lang"]) - Meta.allow_tag_with_these_attributes(:rt, ["lang"]) Meta.allow_tag_with_these_attributes(:rtc, ["lang"]) + Meta.allow_tag_with_these_attributes(:rt, ["lang"]) + Meta.allow_tag_with_these_attributes(:ruby, ["lang"]) + Meta.allow_tag_with_these_attributes(:samp, ["lang"]) + Meta.allow_tag_with_these_attributes(:s, ["lang"]) + Meta.allow_tag_with_these_attributes(:small, ["lang"]) + Meta.allow_tag_with_these_attributes(:strong, ["lang"]) + Meta.allow_tag_with_these_attributes(:sub, ["lang"]) + Meta.allow_tag_with_these_attributes(:sup, ["lang"]) + Meta.allow_tag_with_these_attributes(:tt, ["lang"]) Meta.allow_tag_with_these_attributes(:u, ["lang"]) Meta.allow_tag_with_these_attributes(:ul, ["lang"]) + Meta.allow_tag_with_these_attributes(:var, ["lang"]) + Meta.allow_tag_with_these_attributes(:wbr, ["lang"]) Meta.allow_tag_with_this_attribute_values(:span, "class", [ "h-card", |