Skip to content

Commit

Permalink
Word wrap user’s commit message in result window.
Browse files Browse the repository at this point in the history
Also use htmlize_attr instead of htmlize. The latter is not for use with <pre> as it will convert whitespace sequences to use non-breaking spaces and newlines to ‘<br>\n’ (which was resulting in doubling the line breaks).

Semantically htmlize_attr is for escaping attribute value content, but in practice it is simply entity-encoding the content.
  • Loading branch information
sorbits committed Oct 24, 2009
1 parent e6bfd9c commit e31a520
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Support/app/views/commit/_commit_result.html.erb
Expand Up @@ -10,7 +10,7 @@
</ul>

<h2>Using Message:</h2>
<pre><%= htmlize(message) %></pre>
<pre style="white-space: pre-wrap;"><%= htmlize_attr(message) %></pre>

<% if result[:rev] %>
<h2>Diff of committed changes:</h2>
Expand Down

0 comments on commit e31a520

Please sign in to comment.