Last modified: 2013-07-04 10:38:29 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 T45029, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43029 - Comment preceding table end tag throws off tokenizer
Comment preceding table end tag throws off tokenizer
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Gabriel Wicke
https://en.wikipedia.org/wiki/User:Ka...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-12 19:04 UTC by Ryan Kaldari
Modified: 2013-07-04 10:38 UTC (History)
6 users (show)

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


Attachments

Description Ryan Kaldari 2012-12-12 19:04:03 UTC
If you have a comment inserted on its own line within a table, it seems to break parsing of the table. See https://en.wikipedia.org/wiki/User:Kaldari/EditorTest for an example.
Comment 1 Roan Kattouw 2012-12-12 19:05:19 UTC
Parsoid bug, see http://parsoid.wmflabs.org/en/User:Kaldari/EditorTest
Comment 2 Gabriel Wicke 2012-12-12 19:54:10 UTC
Minimal test case:

echo -e '{|\n|foo\n<!-- -->\n|}\nfoo' | nodejs parse --wt2wt
{|
|foo
<!-- -->
<nowiki>|}
foo</nowiki>
Comment 3 ssastry 2012-12-12 20:04:35 UTC
This is not a serialization issue.  This is a parse problem:

[subbu@earth tests] echo -e '{|\n|foo\n<\!-- -->\n|}\nfoo' | node parse.js
<p data-parsoid="{&quot;dsr&quot;:[1,6]}">-e {|</p>
foo
<!-- -->
<p data-parsoid="{&quot;dsr&quot;:[20,26]}">|}
foo</p>
Comment 4 ssastry 2012-12-12 20:06:28 UTC
> This is not a serialization issue.  This is a parse problem:
> 
> [subbu@earth tests] echo -e '{|\n|foo\n<\!-- -->\n|}\nfoo' | node parse.js
> <p data-parsoid="{&quot;dsr&quot;:[1,6]}">-e {|</p>
> foo
> <!-- -->
> <p data-parsoid="{&quot;dsr&quot;:[20,26]}">|}
> foo</p>

Sorry, bad commandline.  The right output is this here:

[subbu@earth tests] echo '{|\n|foo\n<\!-- -->\n|}\nfoo' | node parse.js
<table data-parsoid="{&quot;tsr&quot;:[0,2],&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[0,24]}">
<tbody data-parsoid="{&quot;dsr&quot;:[3,24]}"><tr data-parsoid="{&quot;dsr&quot;:[3,24]}"><td data-parsoid="{&quot;tsr&quot;:[3,4],&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[3,24]}">foo
<!-- -->
<p data-parsoid="{&quot;dsr&quot;:[17,23]}">|}
foo</p>
</td></tr></tbody></table>
Comment 5 Gabriel Wicke 2012-12-12 21:45:27 UTC
He- that's why I had changed the title back. The table cell content eats one newline too much after the comment, which prevents the table end tag from matching. Am working on a fix.
Comment 6 Gabriel Wicke 2012-12-13 02:39:31 UTC
Fix committed in https://gerrit.wikimedia.org/r/#/c/38484/.
Comment 7 Ryan Kaldari 2012-12-13 03:42:16 UTC
That was fast :)
Comment 8 ssastry 2012-12-13 18:12:04 UTC
Merged.
Comment 9 Andre Klapper 2013-07-04 10:38:29 UTC
[Parsoid component reorg by merging CPP/* tickets into General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]

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


Navigation
Links