VisualEditor: Page content not rendered after unclosed <center> tag in image caption of non-thumbnails
Closed, ResolvedPublic

Description

When an image file is included directly in an article (i.e not as a thumbnail and not in a frame) with an unclosed <center> tag in the caption causes Visual Editor to not render any page content after the image.

See https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox2&oldid=565498603 for an example.

All the following conditions must be true to see this bug:

  • Image must not be a thumbnail or in a frame
  • The image caption must contain an unclosed html tag specifying text alignment in the caption. Tested with <center>, <p align="center"> and <div align="right">
  • The image placement (left, right or center) must be specified

The bug does not occur with an unclosed italic html tag. I haven't tested with other tags.


Version: unspecified
Severity: normal

bzimport set Reference to bz51893.
Thryduulf created this task.Via LegacyJul 23 2013, 4:59 PM
Thryduulf added a comment.Via ConduitJul 23 2013, 5:03 PM

Forgot to note that although this combination of conditions is presumably uncommon, it was first observed in the wild at https://en.wikipedia.org/w/index.php?title=Typographer_%28typewriter%29&oldid=565431177

ssastry added a comment.Via ConduitOct 2 2013, 8:26 PM

Unclosed tags in image caption is not that infrequent unfortunately -- the difference between <center> and <i>/<b> tags is that the former is a block tag and the latter is an inline tag. So, any other block tag that is unclosed will cause the same issue.

That said, I am surprised that this problem showed up in the first place since Parsoid has had support to deal with unbalanced tags for a long time: https://gerrit.wikimedia.org/r/#/c/43384/

This was a bit of a hacky support. More robust and improved support for this is coming in https://gerrit.wikimedia.org/r/#/c/83216/

So, unsure what happened here with this bug.

Jdforrester-WMF added a comment.Via ConduitOct 2 2013, 8:33 PM

Will provisionally mark this as in-review, then (you can see that it's still happening with production Parsoid, though that may be cache errors).

ssastry added a comment.Via ConduitOct 2 2013, 8:49 PM

As we discussed and confirmed on IRC, this is not happening in production right now. So, I am going to mark this resolved-fixed. Please reopen if a similar error shows up.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.