[wp-trac] [WordPress Trac] #22888: Block <a> tags are getting stripped from the Editor
WordPress Trac
noreply at wordpress.org
Wed Dec 12 23:33:28 UTC 2012
#22888: Block <a> tags are getting stripped from the Editor
-----------------------------+--------------------
Reporter: georgestephanis | Owner:
Type: defect (bug) | Status: new
Priority: high | Milestone: 3.5.1
Component: Editor | Version: 3.5
Severity: major | Resolution:
Keywords: needs-patch |
-----------------------------+--------------------
Comment (by bradyvercher):
I'm having a couple of different issues with the <a> tag myself.
1. Type "Some Text" in the editor of a new post.
2. Highlight the text and click the "Insert link" button. Enter a URL and
click the "Add Link" button.
At this point, I've seen a couple of different behaviors:
1. "Some Text" will become a link, but the cursor is inserted before the
text and attempting to type any additional text includes it in the <a>
tag, even when adding paragraph breaks.
2. "Some Text" becomes a link, but the cursor appears to be floating in
the center of the editor and halfway under the toolbar. Adding additional
text inserts a paragraph break, but otherwise appears to work fine.
However, in both cases, switching the editor mode causes issues.
1. Switching to the text editor shows a couple of line breaks before the
closing </a> tag.
2. Switching back to the visual editor then shows a paragraph break after
the </a> tag.
3. And switching back to the text editor again, shows a non-breaking
space.
There doesn't seem to be any consistency and it's creating all sorts of
formatting issues.
In addition to that, custom style formats that do nothing more than add a
class to the <a> tag don't work. Just to demonstrate, insert `<a
class="btn">Button</a>` into the text editor, then switch to visual mode.
The "Insert link" button is depressed, but disabled and the "Unlink"
button doesn't actually do anything.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22888#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list