WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#38096 closed defect (bug) (invalid)

Problem with td background on Visual mode

Reported by: ruicruzpt Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6.1
Component: TinyMCE Keywords:
Focuses: Cc:
PR Number:

Description

Hello,

Steepos to reproduce this bug:

  • create a table in the Text mode with a td like this:
<td style="width: 506px;" background="(...)/image.jpg">
  • Now save it/publish it.
  • Return to the same post and check if that part of the code (background) is still present
  • Move to the Visual mode and again move to the Text mode
  • The background atribute has disappear

If you need further information let me know.

Rui

Change History (2)

#1 @Clorith
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi there,

This is because use of background as an attribute has been deprecated in HTML and as such the editor filters it out to avoid invalid markup.

You should be adding the background part to your style section as such:

<td style="width: 506px; background: url('/image.jpg');">

#2 @ruicruzpt
3 years ago

Hello @Clorith

Thank you. I can reproduce it your way and you are correct.

Sorry for the wrong report.

Rui

Note: See TracTickets for help on using tickets.