修复 “‘查看差别’页面中,HTML标签未清除”的BUG

liuyizhou
louant 9 years ago
parent ea6047c114
commit b57fbd079f

@ -2,7 +2,8 @@
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p> <p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;"> <div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
<%= @diff.to_html.gsub("&lt;","<").gsub("&gt;",">").gsub("&quot;","\"").gsub("&amp;gt;", ">").gsub("&amp;lt;", "<").gsub("&amp;quot;", "\"").html_safe %> <% @new = @diff.to_html.gsub("&amp;","&").gsub("&lt;","<").gsub("&gt;",">").gsub("&quot;","\"").html_safe %>
<%= @new.gsub("&amp;","&").gsub("&lt;","<").gsub("&gt;",">").gsub("&quot;","\"").gsub("/>"," ").html_safe %>
</div> </div>
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p> <p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>

Loading…
Cancel
Save