Last modified: 2014-02-12 23:52:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38018, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36018 - Empty XHTML tag br in mobile view
Empty XHTML tag br in mobile view
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
All All
: Low normal
: ---
Assigned To: Nobody - You can work on this!
: 36072 (view as bug list)
Depends on:
Blocks: Wikisource
  Show dependency treegraph
Reported: 2012-04-16 15:31 UTC by enomil
Modified: 2014-02-12 23:52 UTC (History)
11 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description enomil 2012-04-16 15:31:39 UTC
In mobile view the empty Tag <br /> is replaced with <br></br>, but in HTML 4 the br end tag is forbidden [1]. This causes errors in some user agents (interpreted as double line break). Not tested for other valid empty XHTML tags.

Comment 1 Doug 2012-04-16 20:05:47 UTC
This is a particularly noticeable problem for the poem extension (thus the Wikisource tracker) as can be seen here:, N.B. the double-spacing between lines of the poem.  cf.
Comment 2 enomil 2012-04-17 12:26:11 UTC
The main problem is in the HtmlFormatter.php on line 220: $html = $this->doc->saveXML( $element, LIBXML_NOEMPTYTAG ); This generates valid XML with expanded empty tags (<br /> -> <br></br>, valid but confusing) but not HTML (see Comment 0 above).

There are two ways to solve the issues. 1. use XHTML on MobileFrontend or 2. stript the closing elements for valid HTML.

Other empty tags with forbidden end tag are: area, base, basefont, col, frame, hr, img, input, isindex, link, meta, param [1]. But I guess not all affect the generated layout so much.

Comment 3 enomil 2012-04-18 19:48:52 UTC
*** Bug 36072 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.