title: ngBindHtml different result than $sce.parseAsHtml in template that uses angularUI
body: <p><strong><em>Edit</em></strong>: Solution found! See bottom of question for explanation.</p>
  
  <p>I have a directive sfNgFieldWrapper that contains a tooltip that I got from angularjUI ui-bootstrap.</p>
  
  <p>The text of the tooltip is set with <code>tooltip="{{ttpText}}"</code>.</p>
  
  <p>The problem is that the text contains html entities and these entities are not translated to the correct character.
  I can't use ng-bind-html but I've checked and when I do use it on a span the text for the tooltip is correctly transformed.
  However, I can't use span and ng-bind-html since I need to use tooltip.</p>
  
  <p>To fix this predicament I thought I would use <code>$sce.pareAsHtml</code>. The problem is that the html entities are not correctly transformed to characters!</p>
  
  <p>I use it in my directive link function like so:</p>
  
  <pre><code>scope.ttpText = $sce.parseAsHtml(scope.ttpText);
  </code></pre>
  
  <p>Why doesn't parseAsHtml work while ng-bind-html does?</p>
  
  <p>I can't put the parseAsHtml inside scope.$watch because that triggers a loop.</p>
  
  <p>TrustAsHtml doesn't work either.</p>
  
  <p>The tooltip function binds the content like so:</p>
  
  <pre><code>$document.find( 'body' ).append( tooltip );
  </code></pre>
  
  <h1>Solution</h1>
  
  <p>After looking into the code of ui-bootstrap I started search stackoverflow specifically for it and I found a question with a similar issue and solution!
  <a href="https://stackoverflow.com/questions/19029676/angular-ui-tooltip-with-html">Angular-ui tooltip with HTML</a></p>
  
  <p>Stupid me could also just have checked the AngularUI guide:
  <a href="http://angular-ui.github.io/bootstrap/#/tooltip" rel="nofollow noreferrer">http://angular-ui.github.io/bootstrap/#/tooltip</a></p>
  
  <p>The solution is simple, I can just add <code>-html-unsafe</code> after <code>data-tooltip</code>.</p>