'A' tags in Custom Blocks get removed I created a few regions for my footer. Inside of each region I've added a custom block with plain html code. One has the contact info, another has social media icons and the last one has a map.

The custom block dedicated for the social media icons has only an h2 heading and the a tags for the icons. I'm using font icons for the logos (I know probably not the best for accessibility), so the a tags don't have any text in between them. I am however using the title attribute along with the href attribute.

Everything gets saved and is rendered correctly, however, when I go back to the custom block to make edits all of the a tags are gone; the h2 tags are still there. As long as I don't hit the Save button again the site remains the same, but if I hit Save, obviously all of the icons are gone. I have Full HTML selected as the Text Format so I know that is not the issue. Is there a setting that I have to set to allow empty a tags or is this not allowed at all??

I don't want to hard-code these sections in my template as I want my site administrator to be able to edit each block if necessary.

Any help would be appreciated.

Thanx

I'm running Drupal 8.05 on Ubuntu 14.04

UPDATE

I double checked to make sure there aren't any missing tags. I also updated my code to:

&lt;a href="" title="Best Rate Guarantee"&gt;
&lt;span class="logo logo-bestrate&gt;&lt;/span&gt;
&lt;span class="screen-reader-text"&gt;Best Rate Guarantee&lt;/span&gt;
&lt;/a&gt;


This time the a tag remains but the empty span tag is removed.
Just tested this on a fresh install of 8.0.6 and I think I see what is going on. 

I saved a block using the Full HTML format with the following content:

&lt;a href="#"&gt;&amp;nbsp;&lt;/a&gt;
&lt;a href="#"&gt;&lt;/a&gt;


And had it display in my sidebar region. Everything worked fine, there are two links in this block, that can only really be seen if you inspect the html.

However, when going to edit the block again, with the default as-installed text format settings, ckeditor will wrap my first link with a P tag, and completely remove the second link. 

So, you have a few options.


Enter an &amp;nbsp; character inside your empty tag.
Disable the ckeditor for your format and just use the plain-text editor, with the Full HTML (or a custom filter of your creation) filter.


Ckeditor is doing the fixing of your html, so getting rid of it will solve your problem.