The new Text Widget in WordPress 4.8 is stripping out code. For example, if the following code is placed in the widget via the Text editor:
<ul>
<li><a href="#" class="location"></a>List 1</li>
<li><a href="#" class="location"></a>List 2</li>
</ul>
Just noticed the issue this morning, after upgrading to WP 4.8 on a few sites.