Page MenuHomePhabricator

Empty SGML directives should be supported
Open, LowPublicFeature

Description

Author: giecrilj

Description:
Steps to reproduce:
Enter A<!>B into Sandbox.

Expected results:
AB displayed

Actual results:
A<!>B displayed

Explanation:
By the W3C HTML parser specification, the empty directive <!> acts as a token separator.

Examples:
Procter&<!>Gamble
Use <<!>I> for terms
{{template|{}<!>}}

Workaround:
use <!---->; lengthy.


Version: unspecified
Severity: enhancement
URL: http://www.w3.org/TR/WD-html-lex/

Details

Reference
bz15453

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:19 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz15453.
bzimport added a subscriber: Unknown Object (MLST).

Confirmed. Added parser test in r40389

That feature was removed in subsequent revisions of HTML. Compare:

http://www.w3.org/MarkUp/html-spec/html-spec_3.html#SEC3.2.5
http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#h-3.2.4

SGML has a lot of cool features, and I'd like to see some of them implemented in wikitext, such as empty end tags </>. But this is not required for an HTML parser. Also, <!> is not valid XML and so not valid XHTML.

In any case, wikitext is not HTML, and does not support all HTML features. This should be considered a feature request, not a bug report, and certainly should not have a failing parser test.

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.