Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#50900 closed defect (bug) (duplicate)

5.5-RC3 - Code Editor Broken (change of behavior; Inserts br in content)

Reported by: justin_k's profile Justin_K Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5
Component: Editor Keywords:
Focuses: Cc:

Description (last modified by costdev)

While testing out my plugins against 5.5, there has been a breaking change in the post editor: while in CODE EDITOR mode (note: not visual editor) mode, the instant the mouse focus is taken out of the content box, it appends <br /> tags at the end of every line. This is expected with the visual editor, but not with the code editor. The regression breaks the functionality of my plugin.

Link removed

Change History (9)

#1 @Justin_K
4 years ago

Addendum: it's also doing the opposite - it's removing br tags that I've explicitly entered in the content, apparently making it impossible to use the code editor to write code.

#2 @Justin_K
4 years ago

After some more digging through the multiple duplicate versions of autop, this bug is caused by the js functions removep and & autop in wp-includes/js/dist/autop.js. If I return at the first line of those functions, the code editor behaves properly.

#3 @SergeyBiryukov
4 years ago

  • Component changed from General to Editor
  • Version set to 5.5

#4 @noisysocks
4 years ago

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

Duplicate of #2833.

#5 @Justin_K
3 years ago

The site hosting the screenshot I included in my original issue is no longer valid. I'd like to edit the post to provide an updated link...but it won't let me. It wont let me just remove the issue either.

How can I get this site to let me update the post to address the now-invalid link....?

#6 @Justin_K
3 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Reopening in hopes that doing so will allow me to edit the issue (since I waited 4 weeks for another solution, but no reply)

Edit: It still will not let me edit the issue description. Not sure why it's blocking me from doing so, or how to proceed...

Last edited 3 years ago by Justin_K (previous) (diff)

This ticket was mentioned in Slack in #meta by justin_k. View the logs.


3 years ago

#8 @costdev
3 years ago

  • Description modified (diff)

#9 @costdev
3 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

Re-closing ticket as a duplicate of #2833.

Note: See TracTickets for help on using tickets.