% escape in rendered variables - inconsistent - why?

I’m finding that variables are rendering differently according to context of use.

  • would like to understand why the rendering is different (I know they are “equivalent”)
  • would like to know the recommended way to manage - which one to cast, and how.

Example:

renders to

but

renders to

Thanks for help to explain why one %-escapes and the other does not, and the recommended way to control this.

oops,

<a class="btn btn-outline-secondary btn-sm mb-1 dropdown-toggle" href="#collapse{{ .LinkTitle }}" data-toggle="collapse"></a>
renders to 
<a class="btn btn-outline-secondary btn-sm mb-1 dropdown-toggle" href="#collapseBrother%20Data" data-toggle="collapse"> </a>

but
<div class="collapse" id="collapse{{ .LinkTitle }}">
renders to 
<div class="collapse" id="collapseBrother Data">