Bug 809517
Summary: | EPP-SP: File name is not displayed correctly if it contains Portuguese accent characters during uploading | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Portal Platform 5 | Reporter: | Martin Weiler <mweiler> |
Component: | Site Publisher | Assignee: | Nobody <nobody> |
Status: | VERIFIED --- | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 5.2.0.GA | CC: | epp-bugs, pjha, theute, tkyjovsk |
Target Milestone: | --- | ||
Target Release: | 5.2.1.CR02 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
After uploading a file with special characters in the name, the displayed file name showed incorrect characters. This has been fixed, and special characters in file names are now handled correctly during file upload.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Martin Weiler
2012-04-03 14:59:55 UTC
*** Bug 809851 has been marked as a duplicate of this bug. *** https://jira.exoplatform.org/browse/EXOGTN-735 needs to be ported to the EPP 5.2 code base: --- component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java (.../UploadHandler.java) +++ component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java (.../UploadHandler.java) @@ -101,7 +101,8 @@ } value.append("\n \"").append(uploadIds[i]).append("\": {"); value.append("\n \"percent\":").append('\"').append((int)percent).append("\","); - value.append("\n \"fileName\":").append('\"').append(encodeName(upResource.getFileName())) + String fileName = EntityEncoder.FULL.encode(upResource.getFileName()); + value.append("\n \"fileName\":").append('\"').append(encodeName(fileName)) .append("\""); value.append("\n }"); if (i < uploadIds.length - 1) --- component/web/server/src/main/java/org/exoplatform/upload/UploadService.java (.../UploadService.java) +++ component/web/server/src/main/java/org/exoplatform/upload/UploadService.java (.../UploadService.java) @@ -124,7 +124,6 @@ if (fileName == null) fileName = uploadId; fileName = fileName.substring(fileName.lastIndexOf('\\') + 1); - fileName = EntityEncoder.FULL.encode(fileName); String storeLocation = uploadLocation_ + "/" + uploadId + "." + fileName; Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: After uploading a file with special characters in the name, the displayed file name showed incorrect characters. This has been fixed, and special characters in file names are now handled correctly during file upload. Verified with EPP-5.2.1.CR2 + jboss-eppsp-5.2.1.ER02-exo-2.3.6-CP01-120322114606. The titles of uploaded files are ok, however there is another problem which seems even more serious: the uploaded file with title "ááááá ã ã ã óóóó.txt" cannot be saved when/after edited. javax.jcr.PathNotFoundException: Node not found /sites content/live/%26aacute;%26aacute;%26aacute;%26aacute;%26aacute; %26atilde; %26atilde; %26atilde; %26oacute;%26oacute;%26oacute;%26oacute;.txt This probably calls for a separate bug report. Additionally, the view template for text files doesn't seem display these characters correctly as well. When a text file which contains "ááááá ã ã ã óóóó" is open in ContentExplorer it shows: "ááááá ã ã ã óóóó" WYSIWYG editor in ContentExplorer shows the characters correctly. Honza Fnukal <hfnukal> updated the status of jira GTNPORTAL-2419 to Resolved Tomas, can you please create a new issue in BZ since this patch partly fixes the problem ? |