Hello,
there is a bug in ActionView::Helpers::UrlHelper::current_page(options), this bug causes other methods like (link_to_current_unless) to also behave buggily.
the method definition is:
def current_page?(options)
CGI.escapeHTML(url_for(options)) == @controller.request.request_uri
end
in rails 1.0.0
the url_for method didn't use to escape the HTML, but in version 1.1.2 it does (IMO this should be documented). This causes double escaping.
Also, the request_url method <b>doesn't</b> HTML escapes the url. So, the string match fails.
The current_page? method should be <b>rewritten</b> as:
url_for(options) == CGI.escapeHTML(@controller.request.request_uri)
the above should fix things.
This is my first bug report for rails, so pardon my sloppiness.
Thanks.