Lets clarify what I said. The url is escaped twice, but the output is
the same.

it changes a quote for example into %xx but the second time, it remains
%xx unchanged, cuz its ok

lets look at the function

      def url_for(options = {}, *parameters_for_method_reference)
        if options.kind_of? Hash
          options = { :only_path => true
}.update(options.symbolize_keys)
          escape = options.key?(:escape) ? options.delete(:escape) :
true
        else
          escape = true
        end
        url = @controller.send(:url_for, options,
*parameters_for_method_reference)
        escape ? html_escape(url) : url
      end

most of this function is related to check if :escape => false is
passed, in which case html_escape won't be call.
but before this last line, url already been escaped.
so its not possible to prevent url_for from escaping the URL anymore.
and at this point. providing this option does nothing

but the value returned by html_escape will be the same as the value url
already has. so it does not get really escaped twice. but the string is
going into the machine twice, if you see what I mean.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to