You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2019/10/03 11:06:46 UTC

[wicket] branch wicket-8.x updated: WICKET-6650 Url decode the name of the file after AjaxDownload with Location == Blob

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch wicket-8.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-8.x by this push:
     new fa7d176  WICKET-6650 Url decode the name of the file after AjaxDownload with Location == Blob
fa7d176 is described below

commit fa7d176c9be6d9c1e49b39fdd4e4d9d5c450c433
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Fri Apr 5 13:15:03 2019 +0300

    WICKET-6650 Url decode the name of the file after AjaxDownload with Location == Blob
    
    (cherry picked from commit ac20fab1627c49adb213c2a448a5d8f5dd20518e)
---
 .../main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js   | 1 +
 1 file changed, 1 insertion(+)

diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js
index d0e490c..555909c 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/wicket-ajaxdownload.js
@@ -111,6 +111,7 @@
 							var matches = /filename[^;=\n]*=(([""]).*?\2|[^;\n]*)/.exec(disposition);
 							if (matches !== null && matches[1]) {
 								filename = matches[1].replace(/[""]/g, "");
+								filename = decodeURIComponent(filename);
 							}
 						}