title: How to remove the Zero Space Character (&#8203;) that ASP Repeaters generate?
body: <p>I have a basic asp repeater that generates a <code>ul</code> and its child <code>li</code>s. It seems that each <code>li</code> is preceded by this magical zero space character (<a href="https://stackoverflow.com/a/2973713/61654"><code>&amp;#8203;</code></a>). This messes up the design by adding extra space between each list item.</p>
  
  <p>The code is currently on a dev site so I can't give you a link. Here is the basic markup</p>
  
  <pre><code>&lt;asp:Repeater ID="rptrPageMeta" runat="server"&gt;
  &lt;HeaderTemplate&gt;
      &lt;ul&gt;
  &lt;/HeaderTemplate&gt;
  &lt;ItemTemplate&gt;​
      &lt;li&gt;
      &lt;/li&gt;
  &lt;/ItemTemplate&gt;
  &lt;FooterTemplate&gt;
      &lt;/ul&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;/FooterTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>The repeater has a list of data items that gets bound to it in the Presenter. But in this example it is irrelevant since nothing from each item gets rendered. This is what it generates:</p>
  
  <pre><code>&lt;ul&gt;
  &amp;#8203;
      &lt;li&gt;
      &lt;/li&gt;&amp;#8203;
      &lt;li&gt;
      &lt;/li&gt;&amp;#8203;
      &lt;li&gt;
      &lt;/li&gt;&amp;#8203;
      &lt;li&gt;
      &lt;/li&gt;&amp;#8203;
      &lt;li&gt;
      &lt;/li&gt;&amp;#8203;
      &lt;li&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I would like to remove the character rather than do a CSS hack to hide it. I have tried to remove all white space from the file by making all the code on one line. This removed the white spaces that were there but wont get rid of the zero space character. I also edited the file in notepad++ with all characters displayed and the character wasn't there.</p>
  
  <p>What are some ways that I can remove this character?</p>
  
  <p><strong>EDIT:</strong> I did create a fresh project and was not able to reproduce this issue. The only thing I can assume now is that it is caused by Sitefinity. This code is used in a widget template inside of a Sitefinity 5 CMS.</p>
  
  <p><strong>Current Hack:</strong> The way I am getting around this is by using the following js on the specific list:</p>
  
  <pre><code>if ($('.my-list').length &gt; 0) {
      $('.my-list').each(function() {
          $(this).html($(this).children('li'));
      });
  }
  </code></pre>