<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 *SVN*
 
+* Fixed that single quote was not escaped in a UrlHelper#link_to javascript confirm #549 [Scott Barron]
+
 * Removed the default border on link_image_to (it broke xhtml strict) -- can be specified with :border =&gt; 0 #517 [?/caleb]
 
 * Fixed that form helpers would treat string and symbol keys differently in html_options (and possibly create duplicate entries) #112 [bitsweat]</diff>
      <filename>actionpack/CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -138,7 +138,7 @@ module ActionView
       private
         def convert_confirm_option_to_javascript!(html_options)
           if confirm = html_options.delete(&quot;confirm&quot;)
-            html_options[&quot;onclick&quot;] = &quot;return confirm('#{confirm}');&quot;
+            html_options[&quot;onclick&quot;] = &quot;return confirm('#{confirm.gsub(/'/, '\\\\\'')}');&quot;
           end
         end
     end</diff>
      <filename>actionpack/lib/action_view/helpers/url_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,10 @@ class UrlHelperTest &lt; Test::Unit::TestCase
       &quot;&lt;a href=\&quot;http://www.world.com\&quot; onclick=\&quot;return confirm('Are you sure?');\&quot;&gt;Hello&lt;/a&gt;&quot;,
       link_to(&quot;Hello&quot;, &quot;http://www.world.com&quot;, :confirm =&gt; &quot;Are you sure?&quot;)
     )
+    assert_equal(
+      &quot;&lt;a href=\&quot;http://www.world.com\&quot; onclick=\&quot;return confirm('You can\\'t possibly be sure, can you?');\&quot;&gt;Hello&lt;/a&gt;&quot;, 
+      link_to(&quot;Hello&quot;, &quot;http://www.world.com&quot;, :confirm =&gt; &quot;You can't possibly be sure, can you?&quot;)
+    )
   end
 
   def test_link_image_to</diff>
      <filename>actionpack/test/template/url_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>eb5ca2ea5ff55e2f6a49580afab5e0ddd0b2bf11</id>
    </parent>
  </parents>
  <author>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </author>
  <url>http://github.com/zdennis/rails/commit/25b656fefa75954cffff119a14cf7650f4f99a92</url>
  <id>25b656fefa75954cffff119a14cf7650f4f99a92</id>
  <committed-date>2005-03-06T04:07:13-08:00</committed-date>
  <authored-date>2005-03-06T04:07:13-08:00</authored-date>
  <message>Fixed that single quote was not escaped in a UrlHelper#link_to javascript confirm #549 [Scott Barron]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@837 5ecf4fe2-1ee6-0310-87b1-e25e094e27de</message>
  <tree>f61ce9d31d432a7c25284509b8309c270ebe2775</tree>
  <committer>
    <name>David Heinemeier Hansson</name>
    <email>david@loudthinking.com</email>
  </committer>
</commit>
