Opened 12 years ago
Closed 12 years ago
#23139 closed defect (bug) (duplicate)
Insert/Edit Link adds unwanted paragraph when the link takes up the entire paragraph
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | TinyMCE | Keywords: | needs-patch |
Focuses: | Cc: |
Description
In the TinyMCE editor, select an entire paragraph of text and click the Insert/Edit Link button. Enter a URL or select a page and Insert Link. Look at the resulting HTML(Text) view now. You'll see that the link tag has surrounded the entire paragraph so that it look like this:
<a href="testurl">Test
</a>
The HTML should simply be
<a href="testurl">Test</a>
If you update the page without looking at the HTML view, it produces extra spacing when you actually view the page. The resulting HTML of the live page in Chrome looks like:
<p><a href="testurl">Test</p>
<p></a></p>
The only way to get rid of the extra spacing is to manually edit the HTML in the TinyMCE editor and Update again. Certainly not ideal for the average WordPress user.
I was able to confirm this. I added the code sample from above and published. When viewing the page on the site is shows
This change does not show in the editor only on the front end.