Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
8.4.6, 11.10.4
-
None
-
Unknown
-
Description
Steps to reproduce :
- Start a clean XWiki instance, install the VFS API
- Upload the attached zip file to Main.WebHome, this zip contains just one simple file named "default.html", UTF-8 encoded with the following content :
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>blah É à È</title>
</head>
<body>
<p>I'm the content, here are some accents : É à È</p>
</body>
</html>
- In the content of a page, put the following :
{{velocity}} [[take the test VFS>>path:$services.vfs.url("attach:Main.WebHome@test.zip/default.html")||target="_blank"]] {{/velocity}}
- Save and view, click on the link
Expected :
- The HTML page displays nicely
Actual :
- We have character encoding issues
The server response contains the following header : Content-Type: text/html;charset=iso-8859-1 ; which seems to be the root cause of the issue, forcing a specific charset here : https://github.com/xwiki/xwiki-platform/blob/9902e01cd365546dd6185ad6a7c8ce905b11e1f0/xwiki-platform-core/xwiki-platform-vfs/xwiki-platform-vfs-api/src/main/java/org/xwiki/vfs/internal/AbstractContentResourceReferenceHandler.java#L60 resolves the bug
Attachments
Issue Links
- is related to
-
XWIKI-17204 Allow indicating the content-type to return in the VFS API
- Closed