Permalink
Browse files

get rid of metamorph

  • Loading branch information...
1 parent 4cc1b88 commit 3f0251dc63a390d1faf59845cd4e2f6aeacf627d @SamSaffron SamSaffron committed Mar 25, 2013
View
2 app/assets/javascripts/discourse/templates/post.js.handlebars
@@ -48,7 +48,7 @@
<div class='topic-body span14'>
<div {{bindAttr class="showUserReplyTab:avoid-tab view.repliesHidden:bottom-round :contents :regular view.extraClass"}}>
{{view Discourse.PrependPostView postBinding="this"}}
- <div class='cooked'>{{{cooked}}}</div>
+ {{view Discourse.RawDivView class="cooked" contentBinding="cooked"}}
{{view Discourse.PostMenuView postBinding="this" postViewBinding="view"}}
</div>
{{view Discourse.RepliesView contentBinding="replies" postViewBinding="view"}}
View
13 app/assets/javascripts/discourse/views/raw_div_view.js
@@ -0,0 +1,13 @@
+// used to render a div with unescaped contents
+
+Discourse.RawDivView = Ember.View.extend({
+
+ render: function(buffer) {
+ buffer.push(this.get('content'));
+ },
+
+ contentChanged: function() {
+ this.rerender();
+ }.observes('content')
+
+});

0 comments on commit 3f0251d

Please sign in to comment.