Hilfe:Lint-Fehler/unclosed-quotes-in-heading

This page is a translated version of the page Help:Lint errors/unclosed-quotes-in-heading and the translation is 47% complete.
Es wird erwartet, dass dieses Problem nicht sehr häufig auftritt.

Problem

Wikitext Ausgabe-HTML
__TOC__
Text
==''foo==
bar
<div class="toc" id="toc">
..
<ul><li>..<i>foo</i>..</li></ul>
..
</div>
<i><p>Text</p></i>
<h2><i>foo</i></h2>
<i><p>bar</p></i>

As you can tell, the unclosed quotes causes the ‎<i>-tag to leak onto the rest of the page from that point on. Moreover, the unclosed tag is added as is to the TOC and then leaks from that point on to the rest of the page which causes the page to look broken.

Lösung

Close unclosed double and triple quotes in headings.

Why does this happen?

This is the same reason as in the Help:Extension:Linter/pwrap-bug-workaround case and the Help:Extension:Linter/multiline-html-table-in-list cases. The PHP parser does not have enough information to recognize HTML5 structures. It parses wikitext mostly line-by-line and can misnest HTML tags and relies on RemexHTML to fix it. In these cases, it generates HTML of the form ..<ul><li>..<i>foo</li></ul>..<h2><i>foo</h2></i>. Notice the unclosed ‎<i> tag in the TOC and the misnested ‎<i> tag in the heading.

Werkzeuge

The following tools can help fix unclosed quotes in heading: