lib/glue/uri.rb in glue-0.28.0 vs lib/glue/uri.rb in glue-0.29.0
- old
+ new
@@ -35,11 +35,11 @@
type = File.extname(path)
query_string = md[7]
# real_path = "#{$root_dir}/#{path}"
- parameters = UriUtils.query_string_to_hash(query_string)
+ parameters = Glue::UriUtils.query_string_to_hash(query_string)
path.gsub!(/\+/, " ")
return [path, type, parameters, query_string]
end # match
@@ -95,10 +95,10 @@
pairs = []
parameters.each { |param, value|
# only encode simple classes !
if value.is_a?(Numeric) or value.is_a?(String)
- pairs << "#{param}=#{value}"
+ pairs << "#{param}=#{CGI.escape(value.to_s)}"
end
}
return pairs.join(";")
end