Page MenuHomePhabricator

VisualEditor should strip trailing whitespace from the end of a media file caption
Closed, DuplicatePublic1 Estimated Story Points

Description

In some respects, this is the opposite of T98132: VisualEditor doesn't handle paragraph breaks in image captions editor correctly.

Steps to reproduce:

  1. Add an image.
  2. Type a caption.
  3. Hit return a couple of times.
  4. Insert the image.
  5. See the funny extra white space at the bottom of the thumbnailed image.
  6. Save the page.
  7. See the funny extra lines in the wikitext:
[[File:A decoration on the Grave of Edward Flatau.JPG|thumb|Hygieian malja


]]

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdforrester-WMF renamed this task from VisualEditor should strip trailing blank lines from the end of a caption to VisualEditor should strip trailing whitespace from the end of a media file caption.Sep 13 2016, 7:19 PM
Jdforrester-WMF triaged this task as Low priority.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Deskana set the point value for this task to 1.Oct 12 2017, 2:03 PM
Deskana subscribed.

This is pretty borderline. The wikitext that's generated is perfectly valid, it's just that it the visual editor seems to be interpreting it in a different way. I'm not convinced that stripping the spaces is the correct way to go.