Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with HTML tags inside MFM block #2

Open
1 task
null2264 opened this issue Sep 10, 2023 · 0 comments
Open
1 task

Issue with HTML tags inside MFM block #2

null2264 opened this issue Sep 10, 2023 · 0 comments
Assignees
Labels
bug Something isn't working on halt Can't do this right now priority: 2 Bothersome but I can handle it

Comments

@null2264
Copy link
Owner

null2264 commented Sep 10, 2023

Issues

  • <small>Small text</small> works but $[blur <small>Small text</small>] isn't, probably caused by mfm-parser seems to be caused by Earmark.
  • Things started with a double underscore (__) is parsed incorrectly.

All of these issues could be fixed by using md instead of Earmark since they support custom block.

Tasks

  • Migrate to https://github.com/am-kantox/md
    Currently FastSanitize screw up the end result of md when MFM is involved FastSanitize (Or lexbor to be specific) follows HTML specs very strictly, <center> won't work inside <span>. May need to make a custom handler for MFM inside md, or make an in-house markdown (MFM) parser from scratch.

    In Misskey (or at least in Firefish) <center> is actually <div> with text-align: center CSS. <center> HTML tag inside fn block ($[... ]) will be escaped, other HTML tags seem to be fine? the "rule" is very loose and inconsistent in MFM.
@null2264 null2264 added the bug Something isn't working label Sep 10, 2023
@null2264 null2264 self-assigned this Sep 10, 2023
@null2264 null2264 added priority: 2 Bothersome but I can handle it on halt Can't do this right now labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working on halt Can't do this right now priority: 2 Bothersome but I can handle it
Projects
None yet
Development

No branches or pull requests

1 participant