New lines in 'formatted_body' should be ignored per the HTML spec
This is mostly visible in Gitlab Notifications in the Fractal room.
Some events have new lines in the formatted_body
, like this:
<strong data-mautrix-exclude-plaintext>[<a data-mautrix-exclude-plaintext href=\"https://gitlab.gnome.org/GNOME/fractal\">GNOME/fractal</a>]</strong> <a data-mautrix-exclude-plaintext href=\"https://gitlab.gnome.org/kcommaille\">kcommaille</a>\n added <span data-mx-color=\"#ffffff\"\n data-mx-bg-color=\"#4a86cf\"\n title=\"This label is for the rewrite of Fractal, currently under the working name of fractal-next\"\n > Fractal-next </span>\n to\n\n <a href=\"https://gitlab.gnome.org/GNOME/fractal/-/issues/194\" >issue #194</a>: Replies support
Which is displayed like this:
So occurrences of \n
should be removed except inside <pre>
.
This should preferably be fixed in html2pango
.
Edited by Kévin Commaille