﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13516	CKEditor removes empty html5 anchors without name attribute	Henning	Piotrek Koszuliński	"Since the name attribute is obsolete for a elements in html, we made a plugin variant that creates anchors with id attribute only.

However, the anchor elements with just an id attribute are removed by CKEditor automatically.

From [https://dev.ckeditor.com/ticket/10325] I do understand that you have to remove anchor elements that cannot be edited. But anchor elements having just an id (and no name) attribute are html5, and can be edited at least by our plugin variant.

I don't find a configuration of allowedContent or so to let CKEditor preserve <a id=""x""></a>.

From the CKEditor source code, I see that you remove as follows:

* In core\htmldataprocessor.js
      
	
{{{
// Remove empty link but not empty anchor. (#3829)
  a: function( element ) {
  if ( !( element.children.length || element.attributes.name || element.attributes[ 'data-cke-saved-name' ] ) )
}}}

* In function validateElement


{{{
case 'a':
  // Code borrowed from htmlDataProcessor, so ACF does the same clean up.
  if ( !( element.children.length || element.attributes.name ) )
}}}

My suggestion is allowing to somewhere configure the attributes (other than name) which, if set, preserve empty a elements..."	Bug	closed	Normal	CKEditor 4.5.4	General	3.0	fixed		
