Last modified: 2014-02-12 23:52:40 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. [1] http://www.w3.org/TR/html4/struct/text.html#h-9.3.2.1
This is a particularly noticeable problem for the poem extension (thus the Wikisource tracker) as can be seen here: http://de.m.wikisource.org/w/index.php?title=An_den_Fr%C3%BChling_(Schiller)&mobileaction=toggle_view_mobile, N.B. the double-spacing between lines of the poem. cf. http://de.wikisource.org/wiki/An_den_Fr%C3%BChling_%28Schiller%29
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. [1] http://www.w3.org/TR/html4/index/elements.html
*** Bug 36072 has been marked as a duplicate of this bug. ***
Fixed in 066ab0a104f649f36e39f813f0c6ea741d5103a0 - https://gerrit.wikimedia.org/r/5869