WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 11 months ago

Last modified 11 months ago

#17964 closed defect (bug) (wontfix)

Underlined text is gone when copied.

Reported by: JonezJeA Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: TinyMCE Keywords:
Focuses: Cc:

Description

If you underline a piece of text and you select it to copy/paste it on another spot at the page or post the line under the text is gone.
This bug doesn't appear with bold or italic text.

Change History (6)

comment:1 solarissmoke3 years ago

This is a consequence of the paste_remove_spans option being set to true. Bold and italic text are marked up using <strong> and <em>, but underlining is done using inline styles in a <span>, and these are stripped when pasting.

Can't see any easy solution, as changing paste_remove_spans to false will mess with pasting from word processors.

comment:2 jonezjea3 years ago

  • Version set to 3.2.1

comment:3 c3mdigital11 months ago

  • Resolution set to invalid
  • Status changed from new to closed

Im closing. if anyone thinks we should only enable paste_remove_spans on paste from word please reopen.

comment:4 SergeyBiryukov11 months ago

  • Milestone Awaiting Review deleted

comment:5 nacin11 months ago

  • Resolution changed from invalid to wontfix

Changing to wontfix — this isn't invalid, we just don't intend to address it. That said, I wonder if it is possible to keep underlines but discard all other spans. Going to ask azaozz to take a look.

comment:6 azaozz11 months ago

Think wontfix is proper here. It's much better to clean up pasted content, no matter where it comes from.

The only way this could work is if we enable the <u> tag. It is once again valid in HTML 5 after being deprecated in HTML 4 and XHTML 1, however its purpose/description has changed:

The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation...

Note: See TracTickets for help on using tickets.