danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

Group anchors with HTML entities #163

Open winniehell opened 9 years ago

winniehell commented 9 years ago

Using aglio 2.0.4 with olio 1.2.1, the following

# Group Foo™

## Bar ♥

leads to the following HTML

<section id="foo&amp;trade;" class="resource-group">
  <h2 class="group-heading">Foo™
    <a href="#foo&amp;trade;" class="permalink">¶</a>
  </h2>
  <h2 id="header-bar-♥">Bar ♥
    <a class="permalink" href="#header-bar-♥" aria-hidden="true">¶</a>
  </h2>
</section>

The group anchor is escaped while the other one is not. I think, HTML escaping does not make sense here (URL encoding could). I am not sure whether Unicode in anchors is a good idea but I have no better one.

This issue may be related to #160.