Commit 536fa8cc by Tom Giannattasio

fixed inline thread replace error

parent db4530ce
......@@ -125,7 +125,8 @@ class @DiscussionThreadShowView extends DiscussionContentView
@model.set('endorsed', not endorsed)
highlight: (el) ->
el.html(el.html().replace(/&lt;mark&gt;/g, "<mark>").replace(/&lt;\/mark&gt;/g, "</mark>"))
if el.html()
el.html(el.html().replace(/&lt;mark&gt;/g, "<mark>").replace(/&lt;\/mark&gt;/g, "</mark>"))
class @DiscussionThreadInlineShowView extends DiscussionThreadShowView
renderTemplate: ->
......
......@@ -6,10 +6,10 @@
<h3>{{title}}</h3>
<p class="posted-details">
{{#user}}
<a href="{{user_url}}" class="username">{{username}}</a>
<a href="{{user_url}}" class="username">{{username}}</a>
{{/user}}
{{^user}}
anonymous
anonymous
{{/user}}
<span class="timeago" title="{{created_at}}">{{created_at}}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment