Skip to content

Commit

Permalink
html_safe on methods in diff_helper [#174]
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarrasch committed May 25, 2012
1 parent a827205 commit 5cb6961
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions app/helpers/diff_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def render_diffs(diffs)
out << "</h4>"
out << force_utf8(render_diff(file.diff))
out
end.join("\n")
end.join("\n").html_safe
else
'<div class="clear"></div><div id="commit-diff-container">' +
('<div class="clear"></div><div id="commit-diff-container">' +
render_inline_diffs_controls("commits") +
render_inline_diffs_with_stats(diffs, :open) + "</div>"
render_inline_diffs_with_stats(diffs, :open) + "</div>").html_safe
end
end

Expand All @@ -58,7 +58,7 @@ def render_inline_diffs_with_stats(file_diffs, state = :closed)
end
out << "</div></div>"
out
end.join("\n")
end.join("\n").html_safe
end

def render_inline_diffs_controls(cookie_prefix)
Expand Down Expand Up @@ -86,7 +86,7 @@ def render_inline_diff(udiff, differ = nil, options = {})
out << differ.render(Gitorious::Diff::InlineTableCallback.new)
end
out << "</table>"
out
out.html_safe
end

def render_sidebyside_diff(udiff)
Expand All @@ -112,7 +112,7 @@ def render_diffmode_selector
out << %Q{<li><a href="?diffmode=sidebyside">side by side</a></li>}
end
out << "</ul>"
out
out.html_safe
end

def render_diff_stats(stats)
Expand All @@ -124,7 +124,7 @@ def render_diff_stats(stats)
out << %Q{</li>}
end
out << "</ul>\n"
out
out.html_safe
end

def render_compact_diff_stats(stats)
Expand Down

0 comments on commit 5cb6961

Please sign in to comment.