From 85c77ca074ddc9e019324bb38a416408560a7400 Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 20 May 2014 15:37:05 +0800 Subject: [PATCH] xss, ckeditor js bug. --- app/views/memos/show.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index fcd10a011..91bb1387d 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -110,8 +110,7 @@ <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> -
<%=h reply.content.html_safe %>
- +
<%=h sanitize(reply.content.html_safe) %>

<% if reply.attachments.any?%> <% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %> @@ -144,6 +143,7 @@ \ No newline at end of file