From abd0e1ae7b933cbd1c1907dd9e7f1ce1782cf743 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Fri, 11 Sep 2009 23:55:32 +0200 Subject: InChI escaping fixed --- lib/algorithm.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/algorithm.rb') diff --git a/lib/algorithm.rb b/lib/algorithm.rb index 33731af..7007e3a 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -15,7 +15,9 @@ module OpenTox end def self.weighted_tanimoto(dataset1,compound1,dataset2,compound2) - RestClient.get URI.encode(File.join(@@config[:services]["opentox-dataset"], 'algorithm/weighted_tanimoto/dataset',dataset1.name,'compound',compound1.inchi,'dataset',dataset2.name,'compound',compound2.inchi)) + # URI.escape does not work here + uri = File.join(@@config[:services]["opentox-dataset"], 'algorithm/weighted_tanimoto/dataset',CGI.escape(dataset1.name),'compound',CGI.escape(compound1.inchi),'dataset',CGI.escape(dataset2.name),'compound',CGI.escape(compound2.inchi)) + RestClient.get uri end end -- cgit v1.2.3