Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#7345 closed defect (bug) (invalid)

TinyMCE adds extra spaces after HTML element close

Reported by: meta Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords: space, tag, element, html
Focuses: Cc:


To reproduce:

In HTML mode, enter

<p>I like <a href="http://www.yahoo.com/">Yahoo</a>, not Google.</p>

Switch to visual mode and everything looks OK.

However, if you (a) save the post and re-open it for editing, or (b) switch back to HTML mode, you'll see that there is now a space between the </a> and the comma.

So it appears that the conversion from the visual/rich text mode to HTML is adding gratuitous spaces after every closing HTML element. This drives me crazy as it means I have to edit everything in raw HTML mode or my punctuation gets messed up.

Using Firefox 3, current SVN version of Wordpress.

Change History (1)

#1 @azaozz
10 years ago

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

Cannot reproduce this. The conversion from the Visual to HTML editor may add hard returns "\n" after some block elements, but not after inline elements (like in this example), and doesn't add any spaces.

Tried with Firefox 3, Safari 3.1, Opera 9.51 and IE7, there was no space added after the </a> tag. Could that be coming from a plugin?

Closing as invalid for now, feel free to reopen if you believe this is a problem in the default TinyMCE editor.

Note: See TracTickets for help on using tickets.