Skip to content

Commit ea110ff

Browse files
committed
use raw instead of sanitize to make topic time info appear
1 parent 07e1a65 commit ea110ff

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

app/views/topics/_topic.html.erb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@
2626
<em>
2727
2828
<% if topic.last_reply_user_login.blank? %>
29-
<%= sanitize t("common.created_at", time: timeago(topic.created_at))%>
29+
<%= raw t("common.created_at", time: timeago(topic.created_at))%>
3030
<% else %>
31-
<%= t("common.last_by")%> <%= user_name_tag(topic.last_reply_user_login) %> <%= sanitize t("common.reply_at", time: timeago(topic.replied_at))%>
31+
<%= t("common.last_by")%> <%= user_name_tag(topic.last_reply_user_login) %> <%= raw t("common.reply_at", time: timeago(topic.replied_at))%>
3232
<% end %>
3333
</em>
3434
</div>
3535
</div>
3636
</div>
3737
</div>
3838
<% end %>
39-

app/views/topics/_topic_info.html.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
<h1 class="entry-title"><%= truncate(topic.title, length: 100) %></h1>
66
<div class="info leader">
77
<%= render_node_name(topic.node_name,topic.node_id) %>
8-
·
8+
·
99
<%= user_name_tag(topic.user, data: { author: true }) %>
10-
·
11-
<%= sanitize t("common.created_at", time: timeago(topic.created_at))%>
10+
·
11+
<%= raw t("common.created_at", time: timeago(topic.created_at))%>
1212
<% if !topic.last_reply_user_login.blank? %>
13-
·
14-
<%= t("common.last_by")%> <%= user_name_tag(topic.last_reply_user_login) %> <%= sanitize t("common.reply_at", time: timeago(topic.replied_at))%>
13+
·
14+
<%= t("common.last_by")%> <%= user_name_tag(topic.last_reply_user_login) %> <%= raw t("common.reply_at", time: timeago(topic.replied_at))%>
1515
<% end %>
16-
·
16+
·
1717
<%= topic.hits %> <%= t("common.read_times")%>
1818
</div>
1919
</div>

0 commit comments

Comments
 (0)