aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 19:02:23 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-18 19:02:23 +0000
commit3dc7f7603785c1173df5c24f8b76323f7a795443 (patch)
tree09334451cafbe18c3f561babf4a934ceac604a87
parent79a82e3a97e1ad9d057682ea3b4dc60fb714ec8a (diff)
downloadrails-3dc7f7603785c1173df5c24f8b76323f7a795443.tar.gz
rails-3dc7f7603785c1173df5c24f8b76323f7a795443.tar.bz2
rails-3dc7f7603785c1173df5c24f8b76323f7a795443.zip
Fixed UrlHelper#current_page? to behave even when url-escaped entities are present (closes #3929) [jeremy@planetargon.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 2aff18340b..052d223ec8 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed UrlHelper#current_page? to behave even when url-escaped entities are present #3929 [jeremy@planetargon.com]
+
* Add ability for relative_url_root to be specified via an environment variable RAILS_RELATIVE_URL_ROOT. [isaac@reuben.com, Nicholas Seckar]
* Fixed link_to "somewhere", :post => true to produce valid XHTML by using the parentnode instead of document.body for the instant form #3007 [Bob Silva]
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 1abe1b1220..de6137659e 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -235,7 +235,7 @@ module ActionView
# Returns true if the current page uri is generated by the options passed (in url_for format).
def current_page?(options)
- url_for(options) == @controller.request.request_uri
+ CGI.escapeHTML(url_for(options)) == @controller.request.request_uri
end
private