Opened 14 years ago
Closed 14 years ago
#17330 closed defect (bug) (worksforme)
TinyMCE breaks HTML anchors with the "name" attribute
Reported by: | RanYanivHartstein | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
When you create an HTML anchor with the name attribute in the HTML editor, and then switch to the visual editor, it removes the contents of the tag and places it outside of it, leaving the tag empty.
To reproduce, enter this in the HTML editor:
<a name="bob">Inside</a>
Switch to the visual editor (notice the word "inside" isn't styled as an anchor), and then switch back to the HTML editor. This is what it will look like:
<a name="bob"></a>Inside
This only seems to happen with the name attribute - couldn't reproduce with other attributes such as id.
Initially reported by a WordPress.com user. Tested on latest WordPress.org trunk.
Change History (1)
Note: See
TracTickets for help on using
tickets.
From HTML point of view
<a name="bob">Inside</a>
is exactly the same as<a name="bob"></a>Inside
. The anchor is a hidden pointer to where the page should scroll when accessed withhttp://someurl#anchor
.