[bug] MFM parsing seems to break when underscore used in emoji shortcode #588
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#588
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Your setup
OTP
Extra details
nixnet.social
Version
3.8.0-0-gccae7ef
PostgreSQL version
No response
What were you trying to do?
Send a post from Foundkey. Content of the post:
What did you expect to happen?
The post is rendered as
:akko_mmh:
which is referenced as atag
in the JSON representation:neofox_flop__w_:
In other words it should be parsed as if it was this pseudo HTML
What actually happened?
The post is rendered as
:akko
In other words it seems to be parsed as if it was this pseudo HTML
Logs
No response
Severity
I can manage
Have you searched for this issue?
Something weird may be going on in the space where the markdown and MFM parsers interact? https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/common_api/utils.ex#L292-L294
not sure how easily fixable this is, the underscores would indeed define a markdown italics area, the parser probably takes it as such as emoji are not something it knows exists
there may be hacks to auto-escape underscores within codes or other such nonsense though
I can confirm that what looks like the same thing happens when there's an underscore in a tagged username.
(The MFM post
@t_e_s_t _test_
being rendered as<p>@t<em>e_s_t _test</em></p>
)