<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,7 @@
 
   &lt;li class=&quot;event-comment&lt;%= cycle(&quot; shade&quot;, &quot;&quot;) %&gt;&quot; id=&quot;comment-&lt;%= comment.id %&gt;&quot;&gt;
-    &lt;h3&gt;&lt;a name=&quot;comment-&lt;%= comment.id %&gt;&quot;&gt;&lt;/a&gt; &lt;%= link_to comment.article.title, :controller =&gt; 'articles', :action =&gt; 'edit', :id =&gt; comment.article %&gt;&lt;/h3&gt;
-    &lt;blockquote&gt;&lt;p&gt;&quot;&lt;%= truncate strip_tags(comment.body), 255 %&gt;&quot;&lt;/p&gt;&lt;/blockquote&gt;
+    &lt;h3&gt;&lt;a name=&quot;comment-&lt;%= comment.id %&gt;&quot;&gt;&lt;/a&gt; &lt;%= link_to h(comment.article.title), :controller =&gt; 'articles', :action =&gt; 'edit', :id =&gt; comment.article %&gt;&lt;/h3&gt;
+    &lt;blockquote&gt;&lt;p&gt;&quot;&lt;%= truncate strip_tags(comment.body), :length =&gt; 255 %&gt;&quot;&lt;/p&gt;&lt;/blockquote&gt;
     &lt;span class=&quot;meta&quot;&gt;
       &lt;cite&gt;&amp;mdash; &lt;%= author_link_for comment %&gt;&lt;%= %( (#{comment.author_email})) unless comment.author_email.blank? %&gt;&lt;/cite&gt;
 </diff>
      <filename>app/views/admin/comments/_comment.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -61,6 +61,11 @@ class Admin::CommentsControllerTest &lt; Test::Unit::TestCase
     assert_response :success
   end
   
+  def test_should_update_comment
+    post :update, :article_id =&gt; '1', :id =&gt; '3', :comment =&gt; { :body =&gt; 'New body text' }
+    assert_response :success
+  end
+  
   def test_should_approve_comment
     contents(:welcome_comment).update_attribute(:approved, false)
     xhr :post, :approve, :article_id =&gt; '1', :id =&gt; '3'</diff>
      <filename>test/functional/admin/comments_controller_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9a7251f4b1e8e7147935b1cad8d6f126196bf051</id>
    </parent>
  </parents>
  <author>
    <name>David Cato</name>
    <email>git@crunchyfrog.net</email>
  </author>
  <url>http://github.com/emk/mephisto/commit/c05e9ee1c3e6580b0bff72051c294cc955581001</url>
  <id>c05e9ee1c3e6580b0bff72051c294cc955581001</id>
  <committed-date>2009-03-15T06:35:02-07:00</committed-date>
  <authored-date>2009-03-06T14:53:16-08:00</authored-date>
  <message>Fix tainted string error when updating comment

When updating a comment, a tainted string error was being thrown due to
the lack of a h() escape on the article title in the comment partial.
A deprecation warning from truncate() in the comment partial has also
been resolved.

A functional test (test_should_update_comment) for the admin comments
controller is also included.</message>
  <tree>ca2ae99ace7993d04f809ae7eab6870a6250ca7f</tree>
  <committer>
    <name>Eric Kidd</name>
    <email>git@randomhacks.net</email>
  </committer>
</commit>
