Last modified: 2014-04-01 02:15:22 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 T64264, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62264 - Serialize empty modified image captions to nothing
Serialize empty modified image captions to nothing
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: High minor
: ---
Assigned To: C. Scott Ananian
:
Depends on:
Blocks: 54844
  Show dependency treegraph
 
Reported: 2014-03-05 18:20 UTC by Moriel Schottlender
Modified: 2014-04-01 02:15 UTC (History)
7 users (show)

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


Attachments

Description Moriel Schottlender 2014-03-05 18:20:31 UTC
Right now, VE doesn't remove <figcaption> tags even if they are empty, to make it easy for users to go back and forth on types and filling out/removing captions.

However, that seems to result with a redundant pipe in the wikitext on save for images that have and empty caption. So, when the <figcaption> tag is empty, the wikitext still results with a redundant pipe, like:

[[File:image.jpg|left|500x|]]
Comment 1 C. Scott Ananian 2014-03-20 22:20:54 UTC
This sure seems like a VE bug to me.

Our DOM representation has a way to represent both "empty caption" and "no caption".  VE should be using the right one.
Comment 2 James Forrester 2014-03-31 18:04:38 UTC
Agreed.
Comment 3 Gabriel Wicke 2014-03-31 18:10:22 UTC
Is there actually a use case for 'no caption' for new content being encoded as [[File:Foo.png|thumb|]] vs. [[File:Foo.png|thumb]] ? They seem to render the same: https://www.mediawiki.org/wiki/User:GWicke/Test/EmptyCaption

If this is only about round-tripping then we should just handle that transparently in Parsoid. If the caption is edited we can only serialize it out explicitly if it is non-empty.
Comment 4 C. Scott Ananian 2014-03-31 21:52:44 UTC
We are changing our serialization, but only in the "non-round trip" case.
Comment 5 Gerrit Notification Bot 2014-03-31 21:53:33 UTC
Change 122577 had a related patch set uploaded by Cscott:
Serialize empty modified image captions to nothing.

https://gerrit.wikimedia.org/r/122577
Comment 6 Gerrit Notification Bot 2014-04-01 02:15:22 UTC
Change 122577 merged by jenkins-bot:
Serialize empty modified image captions to nothing.

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

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


Navigation
Links