WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#20149 closed defect (bug) (invalid)

Del button should work the same in Visual & HTML Editors

Reported by: aaroncampbell Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.3
Component: Editor Keywords:
Focuses: Cc:

Description

If you highlight something in the visual editor and click strikethrough (del) it wraps the content in <del> tags. If you do the same in the HTML editor it gets wrapped in <del> tags with the datetime parameter filled with what looks like an ISO 8601 date.

Example:

<del>Deleted from Visual</del>

<del datetime="2012-03-01T13:56:01+00:00">Deleted from HTML</del>

We should standardize these.

One of the side effects of this is that the del button in the HTML editor can't be used in captions because it messes up the quotes (#18311).

Attachments (1)

20149.diff (1.6 KB) - added by sushkov 3 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 @azaozz3 years ago

The same is true for the <ins> tag. The datetime attribute for <del> and <ins> doesn't seem to be displayed or used by the browsers so removing them wouldn't affect anything.

@sushkov3 years ago

comment:2 @sushkov3 years ago

  • Cc stas@… added
  • Keywords has-patch added

comment:3 @aaroncampbell3 years ago

  • Cc aaroncampbell added

comment:4 @jane3 years ago

Fine with removing the timestamp if it makes things easier. Easy enough to add datetime with a plugin if someone really wants that attribute.

comment:5 @jane3 years ago

  • Milestone changed from Awaiting Review to 3.4

comment:6 @aaroncampbell3 years ago

  • Keywords commit added; 2nd-opinion removed

This patch looks good to go.

comment:7 @westi3 years ago

I think removing the timestamp here is a retrograde move and would rather we didn't regress this.

comment:8 @nacin3 years ago

If captions are breaking we need to fix captions, not this.

comment:9 @aaroncampbell3 years ago

  • Keywords has-patch commit removed
  • Resolution set to invalid
  • Status changed from new to closed

We're going to fix captions instead of regressing here

comment:10 @helenyhou3 years ago

  • Milestone 3.4 deleted

comment:11 @mark-k2 years ago

  • Cc mark@… added
  • Severity changed from normal to minor

IMO this is wrong. Semantically (http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html) the del tag have less meaning without the deletion time. I guess it is OK if WordPress do not make it easy to provide the info at all, but to provide it in the less used editor component while ignoring the more used one is strange.

related #23321

Note: See TracTickets for help on using tickets.