After investigating @huuduy216 's forum I managed to identify the cause:
The problem was the HTML tag <br>
being added in a custom Linguist translation for core.forum.discussion_controls.log_in_to_reply_button
.
Flarum's Translations can include a subset of HTML, but it wasn't meant to support self-closing HTML tags. The implementation for Mithril 1 (up to Flarum beta 13) actually seem to have been working with some self-closing tags without issue. However the new implementation for Mithril 2 does not handle self-closing tags at all. The text following the never closed tag ends up being injected as a child of the tag but without being properly parsed by Mithril.
A workaround is to write the self-closing tag like a normal tag: <br></br>
. This fixes the issue and inserts the correct self-closing tag in the DOM.
While it would be nice to support the self closing syntax like <br/>
in translations I'm not actually sure that's something we really need. br
and hr
tags would usually never end up in translations, and either the workaround above or the use of div
already solve the issue. The intent of HTML in translations was meant for links, bold and italics mostly. But there's no official list of what's supported, so maybe we should clarify what is supported.