chef-solr/lib/chef/solr.rb
# escapes a query key/value for http
# Thanks to RSolr!
escapes a query key/value for http
Thanks to RSolr!
escapes a query key / value for http Thanks to RSolr!
def escape(s)
      s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) {
        '%'+$1.unpack('H2'*$1.size).join('%').upcase
      }.tr(' ', '+')
    end
def escape ( s ) s . to_s . gsub ( / ([^ a-zA-Z0-9_.-]+) /n ) { '%' + $1 . unpack ( 'H2' * $1 . size ) . join ( '%' ) . upcase } . tr ( ' ' , '+' ) end
escapes a query key/value for http
Thanks to RSolr!
escapes a query key / value for http Thanks to RSolr!
s