]> source.dussan.org Git - archiva.git/commitdiff
correctly encodeURIComponent parameters
authorOlivier Lamy <olamy@apache.org>
Wed, 23 May 2012 13:35:51 +0000 (13:35 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 23 May 2012 13:35:51 +0000 (13:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1341861 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js

index f63808b2ef92ea11ae8e694f511f8366d753ab63..6c34a8ff32d6a25efcded681bc342f011571710f 100644 (file)
@@ -308,7 +308,7 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
                       entriesUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
                       entriesUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
                       if(classifier){
-                        entriesUrl+="&c="+classifier;
+                        entriesUrl+="&c="+encodeURIComponent(classifier);
                       }
                       $("#main-content #artifact_content_tree").fileTree({
                         script: entriesUrl,
@@ -319,12 +319,12 @@ define("search",["jquery","i18n","jquery.tmpl","choosen","order!knockout","knock
                           fileContentUrl+="/"+encodeURIComponent(self.artifactId)+"/"+encodeURIComponent(self.version);
                           fileContentUrl+="?repositoryId="+encodeURIComponent(getSelectedBrowsingRepository());
                           if(type){
-                            fileContentUrl+="&t="+type;
+                            fileContentUrl+="&t="+encodeURIComponent(type);
                           }
                           if(classifier){
-                            fileContentUrl+="&c="+classifier;
+                            fileContentUrl+="&c="+encodeURIComponent(classifier);
                           }
-                          fileContentUrl+="&p="+file.substringBeforeLast("/");
+                          fileContentUrl+="&p="+encodeURIComponent(file.substringBeforeLast("/"));
                           $.ajax({
                            url: fileContentUrl,
                            dataType: "text",