Page MenuHomePhabricator

VisualEditor frequently adds <br /> to articles
Closed, DuplicatePublic

Description

As reported on the German-language Wikipedia's feedback page, the VisualEditor frequently add an unnecessary <br /> tag to articles:

According to the reporting user @Wurgl there are thousands of these cases.

Event Timeline

Cirdan created this task.May 26 2019, 9:27 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 26 2019, 9:27 AM

If the user enters multiple linebreaks, this is the correct wikitext.

This could be T215002: New paragraph before section heading becomes line break (well, the first example doesn't have the new section above a heading, but it's probably still related).

Wurgl added a comment.Jun 29 2019, 6:35 AM

I do not understand why this one is merged?

Here a <br /> is added at the end of a section. This is caused by different behavior of the source editor and the visual editor.

In the source editor when you edit a single section, you can add as much newlines at the end, as you want. When finishing the edit, that newlines at the end vanish (either the browser does not send them or the software eats them).

In VE those newlines are magically transformed into <br />. Those <br /> should be considered as a temporary workaround caused by "What you see is what you get" and should vanish.

Every day there are about 10 pages with these nasty breaks.