parser MFM server-side #172
4
mix.exs
4
mix.exs
|
@ -191,7 +191,9 @@ defmodule Pleroma.Mixfile do
|
||||||
{:ecto_psql_extras, "~> 0.6"},
|
{:ecto_psql_extras, "~> 0.6"},
|
||||||
{:elasticsearch,
|
{:elasticsearch,
|
||||||
git: "https://akkoma.dev/AkkomaGang/elasticsearch-elixir.git", ref: "main"},
|
git: "https://akkoma.dev/AkkomaGang/elasticsearch-elixir.git", ref: "main"},
|
||||||
{:mfm_parser, git: "https://akkoma.dev/AkkomaGang/mfm-parser.git", ref: "5054e0ba1ebcbd9a7916aec219528e3e58057241" },
|
{:mfm_parser,
|
||||||
|
git: "https://akkoma.dev/AkkomaGang/mfm-parser.git",
|
||||||
|
ref: "5054e0ba1ebcbd9a7916aec219528e3e58057241"},
|
||||||
|
|
||||||
# indirect dependency version override
|
# indirect dependency version override
|
||||||
{:plug, "~> 1.10.4", override: true},
|
{:plug, "~> 1.10.4", override: true},
|
||||||
|
|
|
@ -57,6 +57,7 @@ defmodule Pleroma.HTML.Scrubber.Default do
|
||||||
Meta.allow_tag_with_these_attributes(:ul, [])
|
Meta.allow_tag_with_these_attributes(:ul, [])
|
||||||
|
|
||||||
Meta.allow_tags_with_style_attributes([:span])
|
Meta.allow_tags_with_style_attributes([:span])
|
||||||
|
|
||||||
Meta.allow_tag_with_this_attribute_values(:span, "class", [
|
Meta.allow_tag_with_this_attribute_values(:span, "class", [
|
||||||
"h-card",
|
"h-card",
|
||||||
"quote-inline",
|
"quote-inline",
|
||||||
|
|
|
@ -113,7 +113,9 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
|
||||||
"<span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{full_tag_remote_user.id}\" href=\"#{full_tag_remote_user.ap_id}\" rel=\"ugc\">@<span>full_tag_remote_user</span></a></span>"
|
"<span class=\"h-card\"><a class=\"u-url mention\" data-user=\"#{full_tag_remote_user.id}\" href=\"#{full_tag_remote_user.ap_id}\" rel=\"ugc\">@<span>full_tag_remote_user</span></a></span>"
|
||||||
|
|
||||||
assert content =~ "@oops_not_a_mention"
|
assert content =~ "@oops_not_a_mention"
|
||||||
assert content =~ "<span class=\"mfm\" style=\"display: inline-block; animation: 1s linear 0s infinite normal both running mfm-rubberBand;\">mfm goes here</span> </p>aaa"
|
|
||||||
|
assert content =~
|
||||||
|
"<span class=\"mfm\" style=\"display: inline-block; animation: 1s linear 0s infinite normal both running mfm-rubberBand;\">mfm goes here</span> </p>aaa"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "a misskey MFM status with a _misskey_content field should work and be linked", _ do
|
test "a misskey MFM status with a _misskey_content field should work and be linked", _ do
|
||||||
|
|
Loading…
Reference in a new issue