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

nheko does not render cinny strikethrough #1693

Closed
1 task done
pennae opened this issue Mar 10, 2024 · 3 comments
Closed
1 task done

nheko does not render cinny strikethrough #1693

pennae opened this issue Mar 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@pennae
Copy link

pennae commented Mar 10, 2024

Describe the bug

cinny renders strikethrough to html as <del data-md="~~">, which confuses the hell out of nheko because it textually replace <del> → <s> to render strikethrough. checked that the replacement code is still like this on current master, so we expect it to be broken there too

To Reproduce

  1. view a cinny-generated strikethrough

What happened?

it's not struck through

Expected behavior

it being struck through

Screenshots

No response

Version

0.11.3

Operating system

Linux

Installation method

Some repository (AUR, homebrew, distribution repository, PPA, etc)

Qt version

No response

C++ compiler

No response

Desktop Environment

No response

Did you use profiles?

  • Profiles used?

Relevant log output

No response

Backtrace

No response

@pennae pennae added the bug Something isn't working label Mar 10, 2024
@Mikaela
Copy link
Contributor

Mikaela commented Mar 10, 2024

Which one performs the replacement, Cinny or Nheko? Either way it seems wrong, unless I am misunderstanding, under

@pennae
Copy link
Author

pennae commented Mar 10, 2024

nheko does: https://github.com/Nheko-Reborn/nheko/blob/master/resources/qml/delegates/TextMessage.qml#L41

patching this to replace <del[^>]*?> fixes the problem, but that's a horrid fix and should not go upstream

@deepbluev7
Copy link
Member

I strip the attribute out in the sanitization step now, thank you for the report. Sadly Qt does not support the del tag, so some replacement still needs to happen, however the spec suggest to strip out all attributes anyway unless they are allowed and we are doing that for at least del tags now. Thank you for the report! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants