Page MenuHomePhabricator

Strip annotations (e.g. bold, italics, link) from terminal whitespace
Closed, ResolvedPublic8 Story Points

Description

Author: robindinse

Description:
VisualEdtior often produces garbage like this:

  • non-bold''' bold'''.
  • italic'' ''whitespace.

Version: unspecified
Severity: enhancement

Details

Reference
bz52037

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:47 AM
bzimport set Reference to bz52037.
bzimport created this task.Jul 25 2013, 4:42 PM

On saving, we should remove newly-added annotations from terminal whitespace (so that:

<b data-parsoid="…"> <i>Foo bar</b> </i>

turns into

<b data-parsoid="…"> <i>Foo bar</i></b>

This would fix bug 37835, too.

  • Bug 54270 has been marked as a duplicate of this bug. ***
  • Bug 58605 has been marked as a duplicate of this bug. ***
  • Bug 71620 has been marked as a duplicate of this bug. ***

Bug 71620 has instructions on how to replicate this for wikilinks.

Jdforrester-WMF lowered the priority of this task from High to Normal.Jan 9 2015, 10:55 PM
gpaumier set Security to None.Mar 12 2015, 4:31 PM
gpaumier added subscribers: gpaumier, Eloquence.
Jdforrester-WMF edited a custom field.Apr 1 2015, 7:00 PM
Catrope edited a custom field.Apr 2 2015, 8:48 PM

Change 201583 had a related patch set uploaded (by Catrope):
Trim leading and trailing whitespace from annotations

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

This should fall under Parsoid's HTML sanitisation run, along with empty headings, as this problem is not unique to VE.

This should fall under Parsoid's HTML sanitisation run, along with empty headings, as this problem is not unique to VE.

I disagree. This is about creating nicer HTML, and isn't specific to VE-MW.

Jdforrester-WMF renamed this task from VisualEditor: Strip annotations (e.g. bold, italics, link) from terminal whitespace to Strip annotations (e.g. bold, italics, link) from terminal whitespace.Apr 16 2015, 5:20 PM
Jdforrester-WMF closed this task as Resolved.
Jdforrester-WMF moved this task from Doing to Done on the VisualEditor 2014/15 Q4 blockers board.

Change 201583 merged by jenkins-bot:
Trim leading and trailing whitespace from annotations

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