Changeset 658

Show
Ignore:
Timestamp:
10/15/07 19:03:33 (1 year ago)
Author:
rydahl
Message:

taking out the ruby escape

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/query_parse/lib/mongrel.rb

    r640 r658  
    298298    # version since it's faster.  (Stolen from Camping). 
    299299    def self.escape(s) 
    300       s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) { 
    301         '%'+$1.unpack('H2'*$1.size).join('%').upcase 
    302       }.tr(' ', '+')  
     300      HttpParser.escape(s) 
    303301    end 
    304302 
     
    306304    # Unescapes a URI escaped string. (Stolen from Camping). 
    307305    def self.unescape(s) 
    308       s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n){ 
    309         [$1.delete('%')].pack('H*') 
    310       }  
     306      HttpParser.unescape(s) 
    311307    end 
    312308