Last modified: 2014-08-30 02:56:25 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 T60184, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58184 - Convert "--!>" to placeholder text that wont be recognized by browsers as a comment closing tag.
Convert "--!>" to placeholder text that wont be recognized by browsers as a c...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Low minor
: ---
Assigned To: Arlo Breault
http://parsoid-lb.eqiad.wikimedia.org...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-08 16:40 UTC by Jan Ainali
Modified: 2014-08-30 02:56 UTC (History)
4 users (show)

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


Attachments

Description Jan Ainali 2013-12-08 16:40:47 UTC
In this edit something strange happened: https://se.wikimedia.org/w/index.php?title=N%C3%A4sta_dagordning&diff=27874&oldid=27867

In the top (where nothing were changed, a nowiki was added unexpectedly.
Comment 1 James Forrester 2014-03-11 01:55:13 UTC
I reset the page but the HTML supplied to VE by Parsoid is broken:

http://parsoid-lb.eqiad.wikimedia.org/sewikimedia/N%C3%A4sta_dagordning?oldid=27867

| <dl data-parsoid="…"><dt data-parsoid="…">Tid</dt><dd data-parsoid="…"> 9 december 2013 klockan 18.30 på kontoret/via Google Hangout.</dd></dl>
| <!--
| ; Närvarande
| 
| ; Frånvarande
| -->
| ;Läsning:
| *
| 
| = INLEDNING =
| 
| == Mötets öppnande ==
| 
| == Val av justeringsman ==
| 
| == Val av sekreterare==

Unsurprisingly, this round-trips poorly. :-(
Comment 2 ssastry 2014-07-16 15:46:57 UTC
Three different ways of handling the broken comment:
* PHP + Tidy combination seem to ignore --!> and extend the comment till it finds a --> .. but, this combination seems to be stripping out the comment till the closing "-->"
* Parsoid seems to be parsing this the same way, except that the comment is not stripped out and is left behind.
* Browsers seem to be quite liberal and accept the broken --!> as a closing comment tag which means everything after the --!> which Parsoid treated as part of a comment is rendered as plain text.

I dont think this is a high priority fix required in Parsoid. In Parsoid rendering, broken comments will become visible and are likely to get fixed up in wikitext. I think that is how it should be rather than add a bunch of hacks in Parsoid to handle this scenario.

I am inclined to mark this WONTFIX, but leaving this open in the low/minor category in case you see it differently.
Comment 3 ssastry 2014-07-16 15:54:22 UTC
The fix for this would be as indicated in the title. This would still dirty diff, but the behavior would be consistent with what the PHP+Tidy combination does and works around browser's leniency around broken comments.
Comment 4 Gerrit Notification Bot 2014-07-17 07:57:53 UTC
Change 147051 had a related patch set uploaded by Arlolra:
Accept --!> as a comment closing tag

https://gerrit.wikimedia.org/r/147051
Comment 5 Gerrit Notification Bot 2014-08-30 02:45:52 UTC
Change 147051 merged by jenkins-bot:
Suppress --!> as a comment closing tag in browsers

https://gerrit.wikimedia.org/r/147051

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


Navigation
Links