element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.01k stars 1.96k forks source link

<div> content is ignored with KaTeX lab #17612

Open HarHarLinks opened 3 years ago

HarHarLinks commented 3 years ago

Description

{
  "type": "m.room.message",
  "content": {
    "msgtype": "m.text",
    "format": "org.matrix.custom.html",
    "body": "<div>within div</div> without div",
    "formatted_body": "<div>within div</div> without div"
  }
}

image

Steps to reproduce

Element can ignore the structure given by the tag, and it's other properties, but should at least show the content? See also parity with android, which does show it as expected.

Possibly Element could warn about tags not being supported when sending /html.

Logs being sent: no

Version information

For the desktop app:

jaywink commented 2 years ago

Just hit this and but none of my colleagues I asked could see the issue.

I went through my labs flags and turning off LaTeX rendering made the content inside div's visible. @HarHarLinks does this solve your issue too, making the LaTeX rendering the fault here?

My version is Element Nightly version: 2021111801

HarHarLinks commented 2 years ago

You are correct, turning off latex in labs reveals the text between the div tags. it produces an unexpected linebreak then with an event source as given above: image

rda0 commented 2 years ago

Enabled maths rendering also breaks markdown rendering for inline code blocks if they contain <div>

JokerGermany commented 1 year ago

Happens with mjolnir reports, too. grafik