@@ -55,14 +55,14 @@ var api = (function(){
5555
5656 output . signature . info = function ( sig_name ) {
5757 var query = "Signature/Info/"
58- query = query . concat ( encodeURI ( sig_name ) ) ;
58+ query = query . concat ( encodeURIComponent ( sig_name ) ) ;
5959 query = postProcess ( query )
6060 return $ . ajax ( query , { dataType : "json" } ) . then ( x => x )
6161 }
6262
6363 output . signature . scores = function ( sig_name ) {
6464 var query = "Signature/Scores/"
65- query = query . concat ( encodeURI ( sig_name ) )
65+ query = query . concat ( encodeURIComponent ( sig_name ) )
6666 query = postProcess ( query )
6767 return $ . ajax ( query , { dataType : "json" } ) . then ( x => {
6868 return _ . fromPairs ( _ . zip ( x [ 'cells' ] , x [ 'values' ] ) )
@@ -71,7 +71,7 @@ var api = (function(){
7171
7272 output . signature . meta = function ( meta_name ) {
7373 var query = "Signature/Meta/"
74- query = query . concat ( encodeURI ( meta_name ) )
74+ query = query . concat ( encodeURIComponent ( meta_name ) )
7575 query = postProcess ( query )
7676 return $ . ajax ( query , { dataType : "json" } ) . then ( x => {
7777 return _ . fromPairs ( _ . zip ( x [ 'cells' ] , x [ 'values' ] ) )
@@ -80,7 +80,7 @@ var api = (function(){
8080
8181 output . signature . expression = function ( sig_name ) {
8282 var query = "Signature/Expression/"
83- query = query . concat ( encodeURI ( sig_name ) )
83+ query = query . concat ( encodeURIComponent ( sig_name ) )
8484 query = postProcess ( query )
8585 return $ . ajax ( query , { dataType : "json" } ) . then ( x => x )
8686 }
@@ -103,7 +103,7 @@ var api = (function(){
103103 output . clusters . sigProjMatrix = function ( cluster_variable , meta )
104104 {
105105 var query = "Clusters/"
106- query = query . concat ( encodeURI ( cluster_variable ) )
106+ query = query . concat ( encodeURIComponent ( cluster_variable ) )
107107 if ( meta ) {
108108 query = query . concat ( "/SigProjMatrix/Meta" )
109109 } else {
@@ -115,7 +115,7 @@ var api = (function(){
115115
116116 output . clusters . cells = function ( cluster_variable ) {
117117 var query = "Clusters/"
118- query = query . concat ( encodeURI ( cluster_variable ) )
118+ query = query . concat ( encodeURIComponent ( cluster_variable ) )
119119 query = query . concat ( "/Cells" )
120120 query = postProcess ( query )
121121 return $ . ajax ( query , { dataType : "json" } ) . then ( x => {
@@ -174,7 +174,7 @@ var api = (function(){
174174 output . projections . coordinates = function ( projection_name , projection_column )
175175 {
176176 var query = "Projections/"
177- query = query . concat ( encodeURI ( projection_name ) , "/coordinates/" , encodeURI ( projection_column ) )
177+ query = query . concat ( encodeURIComponent ( projection_name ) , "/coordinates/" , encodeURIComponent ( projection_column ) )
178178 query = postProcess ( query )
179179 return $ . ajax ( query , { dataType : "json" } ) . then ( x => fix_coordinates_1d ( x ) )
180180 }
@@ -193,7 +193,7 @@ var api = (function(){
193193 // Get cell coordinates for this 2d projection
194194 output . tree . coordinates = function ( projection ) {
195195 var query = "Tree/Projections/"
196- query = query . concat ( encodeURI ( projection ) , "/coordinates" )
196+ query = query . concat ( encodeURIComponent ( projection ) , "/coordinates" )
197197 query = postProcess ( query )
198198 return $ . ajax ( query , { dataType : "json" } ) . then ( x => [ fix_coordinates ( x [ 0 ] ) , [ x [ 1 ] , x [ 2 ] ] ] )
199199 }
@@ -226,7 +226,7 @@ var api = (function(){
226226
227227 output . expression . gene = function ( gene_name ) {
228228 var query = "Expression/Gene/"
229- query = query . concat ( encodeURI ( gene_name ) ) ;
229+ query = query . concat ( encodeURIComponent ( gene_name ) ) ;
230230 query = postProcess ( query )
231231 return $ . ajax ( query , { dataType : "json" } ) . then ( x => {
232232 return _ . fromPairs ( _ . zip ( x [ 'cells' ] , x [ 'values' ] ) )
@@ -259,7 +259,7 @@ var api = (function(){
259259 output . cell = { }
260260
261261 output . cell . meta = function ( cellId ) {
262- var query = "Cell/" + encodeURI ( cellId ) + "/Meta"
262+ var query = "Cell/" + encodeURIComponent ( cellId ) + "/Meta"
263263
264264 query = postProcess ( query )
265265 return $ . ajax ( query , { dataType : "json" } ) . then ( x => x )
@@ -283,7 +283,7 @@ var api = (function(){
283283
284284 output . cells . saveSelection = function ( selectionName , subset ) {
285285 var query = "Cells/Selections/"
286- query = query . concat ( encodeURI ( selectionName ) )
286+ query = query . concat ( encodeURIComponent ( selectionName ) )
287287
288288 query = postProcess ( query )
289289 return $ . ajax ( query , {
@@ -296,7 +296,7 @@ var api = (function(){
296296
297297 output . cells . getSelection = function ( selectionName ) {
298298 var query = "Cells/Selections/"
299- query = query . concat ( encodeURI ( selectionName ) )
299+ query = query . concat ( encodeURIComponent ( selectionName ) )
300300 query = postProcess ( query )
301301 return $ . ajax ( query , { dataType : "json" } ) . then ( x => x ) ;
302302
0 commit comments