Hi,

most messages containing *<br>* tags are not directly used as raw HTML, but
instead parsed, so from a compatibility perspective it shouldn't really
matter which form you're using in message translations, as the parser will
turn all of them into the same form anyways.
I checked a random Wikipedia page, and it looks like the legacy parser
outputs the elements as *<br />*, while Parsoid uses *<br>*.
The message parser used in JavaScript (jqueryMsg) outputs them as *<br>* as
well (at least when using .parse(), which uses jQuery to serialize the
elements to HTML).

On Sat, Feb 28, 2026 at 2:49 PM Amir E. Aharoni via Wikitech-l <
[email protected]> wrote:

> Hi,
>
> Some translatable messages in MediaWiki and extensions have <br> tags.
>
> Sometimes they are written as <br>, sometimes as <br />, and sometimes as
> <br/>. I would love to make it consistent across all the messages, but I'm
> not totally sure which form to choose.
>
> I recall that many years ago, I read an article that recommends using <br
> />, because it was the most compatible form with the various browsers and
> HTML standards.
>
> Things probably changed since then. From what I'm reading online now, the
> <br> form is probably the best.
>
> However, I might be wrong. Are there still any good reasons to use <br />
> or <br/> in 2026, or is it safe to switch to <br> everywhere?
>
> --
> Amir Elisha Aharoni · אָמִיר אֱלִישָׁע אַהֲרוֹנִי
> http://aharoni.wordpress.com
> ‪“We're living in pieces,
> I want to live in peace.” – T. Moore‬
> _______________________________________________
> Wikitech-l mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/



-- 
Best regards
SomeRandomDeveloper
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to