title: Rails: Adding an empty tag plus content to link_to
body: <p>I'm trying to generate a link using the link_to helper that will output the following HTML:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;a href="some_url"&gt;&lt;i class="some_class"&gt;&lt;/i&gt;Link Name&lt;/a&gt;
  </code></pre>
  
  <p>However the code I'm using to <em>try</em> to accomplish this:<br>
  </p>
  
  <pre><code>link_to(tag("i", class: options[:icon]) + title, url)
  </code></pre>
  
  <p>...is outputting:<br>
  </p>
  
  <pre><code>&lt;a href="some_url"&gt;&lt;i class="some_class"&gt;Link Name&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  
  <p>Why is it doing this, and how can I fix it? Thanks.</p>
  
  <p><strong>EDIT:</strong><br>
  I believe I found the issue.</p>
  
  <p><code>&lt;i&gt;</code> tags are not self-closable tags in HTML5. Therefore the text after the <code>i</code> is treated as that element's content.</p>