Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#35890 closed defect (bug) (fixed)

TinyMCE downs with the given piece of html text

Reported by: elvinhaci's profile Elvin.Haci Owned by: azaozz's profile azaozz
Milestone: 4.5 Priority: normal
Severity: normal Version: 4.4.2
Component: TinyMCE Keywords:
Focuses: Cc:


Hello. I have a small piece of text which causes TinyMce stopping (entire editor page becomes unaavailable)

Just paste the attached text to TEXT tab of wp editor, then try to switch Visual tab. The page will become unavailable.

I have tested this bug with 3 websites and 2 browsers - the problem is common, not specific.

Attachments (1)

bug.html (5.2 KB) - added by Elvin.Haci 8 years ago.
paste the html text to TEXT tab of wp editor of wp-admin

Download all attachments as: .zip

Change History (5)

8 years ago

paste the html text to TEXT tab of wp editor of wp-admin

#1 @Elvin.Haci
8 years ago

p.s. i have also found the main reason of the problem.
Long empty spaces before "3GPP Long Term Evolution" string in text causes the problem. If remove it, it will work.

#2 @azaozz
8 years ago

  • Component changed from Editor to TinyMCE
  • Milestone changed from Awaiting Review to 4.5

Confirmed. Happens only when wpautop is disabled and there are many U+00A0 (UTF-8 for &nbsp;) between the opening <p> tag and an inline tag like the <strong> in the example. This will hang it:

<p>                                                                                     <strong>Lorem ipsum dolor sit amet consectetuer at Nullam velit Aenean In.</strong></p>

Caused by the regexp for removing the space chars from empty paragraphs in the "wordpress" plugin:

Fix coming up.

#3 @azaozz
8 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 36597:

TinyMCE: fix the regex that removes spaces from empty paragraphs. Was causing problems when wpautop is disabled and there are many U+00A0 chars between the opening <p> and an inline tag. These chars are inserted by the browsers to maintain consecutive spaces typed by the users in contentEditable.

Fixes #35890.

This ticket was mentioned in Slack in #core-editor by iseulde. View the logs.

8 years ago

Note: See TracTickets for help on using tickets.