Page MenuHomePhabricator

Investigate remaining rtselser errors in parserTest runs
Closed, ResolvedPublic0 Estimated Story Points

Description

I just fixed bug 67768 and found that it would have been found/fixed earlier had we fixed the corresponding rtselser error that was there in the blacklist file all along.

Here are 3 more that are lurking in that blacklist. Worth investigating.

add("selser", "Comment semantics: unclosed comment at end 5", "<!--This comment will run out to the end of the document-->");
add("selser", "Sanitizer: Closing of closed but not open table tags 5", "Table not started");
add("selser", "Table in fosterable position 5", "{{OpenTable}}\n<div>\n{|\n|}\n");


Version: unspecified
Severity: normal

Details

Reference
bz67787

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:33 AM
bzimport set Reference to bz67787.
  • Bug 62025 has been marked as a duplicate of this bug. ***

From the blacklist:

add("selser", "Isolated close tags should be treated as literal text (bug 52760) 5", "\n<s.foo>s</s>\n");
add("selser", "Comment semantics: unclosed comment at end 5", "<!--This comment will run out to the end of the document-->");
add("selser", "Media link with nasty text\nfixme: doBlockLevels won't wrap this in a paragraph because it contains a div 5", "[[Media:Foobar.jpg|Safe Link<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>]]<div style=display:none>\" onmouseover=\"alert(document.cookie)\" onfoo=\"</div>\n");
add("selser", "Sanitizer: Closing of closed but not open tags 5", "");
add("selser", "Sanitizer: Closing of closed but not open table tags 5", "Table not started");
add("selser", "Table in fosterable position 5", "{{OpenTable}}\n<div>\n{|\n|}\n");

"Comment semantics: unclosed comment at end" test will continue to be a failure since we don't use selser for comments. That is an acceptable failure

The following 2 tests are acceptable as well since the HTML output eliminates all traces of the closed but not open tags and hence there is no dsr information for these eliminated text nodes. When they show up in the middle of other content, say "foo</b>bar" selser will handle it properly since the whole text node will have a wrapper element with DSR information. But, unclosed tags in isolation will disappear without a trace.

"Sanitizer: Closing of closed but not open tags"
"Isolated close tags should be treated as literal text (bug 52760)"

As for this one, the stray closing table tags (which are block elements) suppresses paragraph wrapping for the text which introduces the same selser problem (no element with valid DSR info) for this test as the above. Expected behavior on an edge case. Not worth fretting over and fixing.

"Sanitizer: Closing of closed but not open table tags"

The output for "Media link with nasty text\nfixme: doBlockLevels won't wrap this in a paragraph because it contains a div" shows broken DSR values for the test and is worth investigating and fixing. I might create a new ticket for it.

<p data-parsoid="{&quot;dsr&quot;:[0,106,0,0]}"><a rel="mw:WikiLink" href="./Media:Foobar.jpg" title="Media:Foobar.jpg" data-parsoid="{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Media:Foobar.jpg&quot;},&quot;sa&quot;:{&quot;href&quot;:quot;Media:Foobar.jpg&quot;},&quot;dsr&quot;:[0,106,19,2]}">Safe Link</a></p><div style="display:none" data-parsoid="{&quot;stx&quot;:&quot;html&quot;,&quot;dsr&quot;:[28,104,24,6]}"><a rel="mw:WikiLink" href="./Media:Foobar.jpg" title="Media:Foobar.jpg" data-parsoid="{&quot;stx&quot;:&quot;piped&quot;,&quot;a&quot;:{&quot;href&quot;:&quot;./Media:Foobar.jpg&quot;},&quot;sa&quot;:{&quot;href&quot;:&quot;Media:Foobar.jpg&quot;},&quot;dsr&quot;:[0,106,19,2]}">" onmouseover="alert(document.cookie)" onfoo="</a></div><p></p

The "Table in fosterable position" test is similar ot the other stray closing tag tests even though it is more complicated. When a table is in fosterable position, the table is not fostered out. Instead the parent table is closed. This effectively makes the original closing table tag a stray closing tag and it gets removed from the DOM and hence all DSR information is lost for it.

So, I am going to consider that failure as a wont-fix as well.

The sole problematic failure is now T89753. Closing this task as resolved.