Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years 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:


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)

#1 @solarissmoke
7 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.

#2 @jonezjea
7 years ago

  • Version set to 3.2.1

#3 @c3mdigital
5 years 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.

#4 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted

#5 @nacin
5 years 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.

#6 @azaozz
5 years 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.