title: angularjs newline filter with no other html
body: <p>I'm trying to convert newline characters (<code>\n</code>) to html <code>br</code>'s.<br>
  As per <a href="https://groups.google.com/forum/?fromgroups=#!topic/angular/kRk9_udDZFc">this discussion in the Google Group</a>, here's what I've got:</p>
  
  <pre><code>myApp.filter('newlines', function () {
      return function(text) {
          return text.replace(/\n/g, '&lt;br/&gt;');
      }
  });
  </code></pre>
  
  <p>The discussion there also advises to use the following in the view:</p>
  
  <pre><code>{{ dataFromModel | newline | html }}
  </code></pre>
  
  <p>This seems to be using the old <code>html</code> filter, whereas now we're supposed to use the <code>ng-bind-html</code> attribute.</p>
  
  <hr>
  
  <p>Regardless, this poses a problem: I don't want any HTML from the original string (<code>dataFromModel</code>) to be rendered as HTML; only the <code>br</code>'s.</p>
  
  <p>For example, given the following string:</p>
  
  <blockquote>
    <p>While 7 > 5<br>
    I still don't want html &amp; stuff in here...</p>
  </blockquote>
  
  <p>I'd want it to output:</p>
  
  <pre><code>While 7 &amp;gt; 5&lt;br&gt;I still don't want html &amp;amp; stuff in here...
  </code></pre>
  
  <p>Is there any way to accomplish this?</p>