Permalink
Browse files

use `html_safe` instead of deprecated `html_safe!`

  • Loading branch information...
1 parent 64e519c commit 21d4f8389ad9d135356502da55122f20739ed149 @mislav committed May 26, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/will_paginate/view_helpers.rb
@@ -238,7 +238,7 @@ def to_html
links.push page_link_or_span(@collection.next_page, 'disabled next_page', @options[:next_label])
html = links.join(@options[:separator])
- html.html_safe! if html.respond_to? :html_safe!
+ html = html.html_safe if html.respond_to? :html_safe
@options[:container] ? @template.content_tag(:div, html, html_attributes) : html
end
@@ -298,7 +298,7 @@ def visible_page_numbers
def page_link_or_span(page, span_class, text = nil)
text ||= page.to_s
- text.html_safe! if text.respond_to? :html_safe!
+ text = text.html_safe if text.respond_to? :html_safe
if page and page != current_page
classnames = span_class && span_class.index(' ') && span_class.split(' ', 2).last

1 comment on commit 21d4f83

@Flink
Contributor
Flink commented on 21d4f83 May 27, 2010

Good you made the fix. I just found out and was going to make a patch ;)

Please sign in to comment.