#21528 closed defect (bug) (duplicate)
A tag bug with NAME and HREF parameter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
I'm noticing a bug using a tags using 3.4.1. Tried on a few sites using 3.4.1.
To replicate:
When editing a post, go in HTML view.
Add a link with both a HREF and a NAME:
<a href="http://google.com" name="#google">google</a>
Click on Visual mode
Go back to HTML mode. code now looks like:
<a href="http://google.com" name="#google"></a>google
Link text is being moved outside the a tag.
I don't believe this should happen - you should, in theory, be able to put both an HREF and a NAME together, though perhaps this isn't valid syntax.
Change History (4)
#2
@
13 years ago
- Keywords close added
This has come up before. The visual editor separates anchors and links as the name
attribute was formally deprecated in XHTML 1.0. In HTML 5.0 this was "downgraded" to a recommendation to always use ID
instead of name
.
Currently you can use an anchor followed by a link:
<a name="123"></a><a href="go-there">...</a>
which will work in exactly the same way.
If you really need to still use <a name="..."> and have it act as a link too, perhaps open a ticket on TinyMCE's bug-tracker.
Confirmed. This happens with valid markup too:
<a name="google" href="http://google.com">google</a>
is changed to<a name="google" href="http://google.com"></a>google
.The
href
attribute doesn’t make a difference. Without it the same happens.