diff options
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp/src/main')
3 files changed, 11 insertions, 8 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/artifacts-management.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/artifacts-management.js index aa96a8339..ab8b307d7 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/artifacts-management.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/artifacts-management.js @@ -47,8 +47,11 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn displayErrorMessage( $.i18n.prop("fileupload.upload.required")); return; } - var url="restServices/archivaUiServices/fileUploadService/save/"+this.repositoryId()+"/"+this.groupId()+"/"+this.artifactId(); - url+="/"+this.version()+"/"+this.packaging(); + var url="restServices/archivaUiServices/fileUploadService/save/"+encodeURI(this.repositoryId()) + +"/"+encodeURIComponent(this.groupId()) + +"/"+encodeURIComponent(this.artifactId()) + +"/"+encodeURIComponent(this.version()) + +"/"+encodeURIComponent(this.packaging()); $.log("this.generatePom():'"+this.generatePom()+"'"); if (this.generatePom()==true){ url+="?generatePom=true"; @@ -117,9 +120,9 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn if (!data.formData){ data.formData={}; } - data.formData.pomFile = pomFile; - data.formData.classifier = classifier; - data.formData.packaging = packaging; + data.formData.pomFile = encodeURIComponent(pomFile); + data.formData.classifier = encodeURIComponent(classifier); + data.formData.packaging = encodeURIComponent(packaging); }); } }); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js index 7c0db1ce4..5802adcd5 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/utils.js @@ -284,7 +284,7 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i if (mainContent.find("#"+data.fieldName)){ var message=null; if (data.errorKey) { - message=$.i18n.prop('data.errorKey'); + message=$.i18n.prop(data.errorKey); } else { message=data.errorMessage; } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html index b377fbb96..dc6e7672c 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html @@ -653,7 +653,7 @@ {% if (file.error) { %} <td class="error" colspan="2"> <span class="label label-important">{%=$.i18n.prop('fileupload.error')%}</span> - {%=$.i18n.prop('fileupload.errors.'+[file.error]) || file.error%} + {%=$.i18n.prop('fileupload.errors.'+file.error.replace(/\s+/,'_')) || file.error%} </td> {% } else if (o.files.valid && !i) { %} <td> @@ -692,7 +692,7 @@ {% if (file.error) { %} <td class="error" colspan="2"> <span class="label label-important">{%=$.i18n.prop('fileupload.error')%}</span> - {%=$.i18n.prop('fileupload.errors.'+[file.error]) || file.error%} + {%=$.i18n.prop('fileupload.errors.'+file.error.replace(/\s+/,'_')) || file.error%} </td> {% } else { %} <td colspan="2"></td> |