Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 17 months ago

#3312 closed defect (bug) (fixed)

Capital Z in HTML editor triggers new line

Reported by: foolswisdom's profile foolswisdom Owned by: andy's profile andy
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

Capital Z in HTML editor triggers new line when you switch to the Visual editor

ENV: WP trunk r6805

REPRO: always

STEPS

  1. In HTML (quick tag) editor enter Zebra
  2. Click Editor (Visual) tab

ACTUAL RESULTS
Test has become:
Z
ebra

ADDITIONAL DETAILS

Entering <a href="http://example.com">ZYX</a> becomes
Z
YX
with those being two links to the same site

Attachments (1)

no-z.2.diff (1.1 KB) - added by andy 19 years ago.
This one!

Download all attachments as: .zip

Change History (6)

#1 @Nazgul
19 years ago

  • Keywords needs-patch added

The following line is the culprit (578 of wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js):

pee = pee.replace(new RegExp('\n*([^\Z]+?)\\n{2}', 'mg'), "<p>$1</p>\n");

I don't know how to fix it, because I don't have a clue what that line is supposed to do.

#2 @andy
19 years ago

  • Owner changed from anonymous to andy

That line

#3 @andy
19 years ago

That line is meant to grab everything up to a double line ending and put it in a paragraph. Backslash-Z should mean "all characters not being the end boundary of a line." I'll work out a better pattern.

@andy
19 years ago

This one!

#4 @andy
19 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#5 @ryan
19 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.