Last modified: 2012-12-06 20:36:19 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 T44487, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42487 - VisualEditor: Converter crashes if a page has a <span> element with a <p> elements
VisualEditor: Converter crashes if a page has a <span> element with a <p> ele...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Data Model (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2012-12-10
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-28 03:02 UTC by Roan Kattouw
Modified: 2012-12-06 20:36 UTC (History)
4 users (show)

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


Attachments

Description Roan Kattouw 2012-11-28 03:02:26 UTC
Wikitext to reproduce:

<span>
[bunch of newlines]
</span>

Parsoid generates <span><p></p></span> for this, but it doesn't mark the span.

Todo:
* Make the failure a bit more graceful
* Investigate whether p inside span is legal
* Investigate other cases where this breakage occurs
* File bug with Parsoid for proper protection of user-generated tags
Comment 1 James Forrester 2012-11-28 17:36:14 UTC
This content would be in violation of the HTML spec, I believe.
Comment 2 Roan Kattouw 2012-11-28 23:46:17 UTC
(In reply to comment #1)
> This content would be in violation of the HTML spec, I believe.
Yes. But Gabriel argues this is bound to occur in some cases anyway.

Proposed approach: detect these cases (block node inside inline node or annotation node) without crashing, and handle them by backing out and alienating the outer node.
Comment 3 Roan Kattouw 2012-12-06 01:22:27 UTC
Slight tweak to the approach: it was easier not to back up to the outer node, but instead just inline-alienate the inner node.

https://gerrit.wikimedia.org/r/37172
Comment 4 Trevor Parscal 2012-12-06 20:36:19 UTC
Resolved in If420ae80ab0777424a9a5517335ef9d0170e87ae

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


Navigation
Links