Bug #4590
closedxsl:result-document writing to file containing spaces
100%
Description
When the base output URI used for xsl:result-document
represents a directory with spaces in its name, the result document is written to a path with %20
in the name, e.g. c:/My%Documents
Updated by Michael Kay over 4 years ago
See writeFileAsync
in NodeJSPlatform line 302. We are using url.pathname
to convert the URI to a filename, and this is not decoding %HH escape sequences.
Updated by Michael Kay over 4 years ago
First attempt to find a solution led me to the npm package filenamify, which purports to convert URIs to filenames. But as far as I can see, it doesn't decode %HH escape sequences.
The module at https://github.com/TooTallNate/file-uri-to-path looks a better bet, judging by the examples.
But most of its work is done using decode-uri(), which is a global function, and which we could probably use directly.
Updated by Michael Kay over 4 years ago
- Applies to JS Branch 2.0 added
- Fix Committed on JS Branch Trunk added
Fixed by putting the output URI's pathname through the decodeURIComponent
function in NodeJSPlatform
methods writeFile
and writeFileAsync
.
Updated by Community Admin almost 4 years ago
- Applies to JS Branch 2 added
- Applies to JS Branch deleted (
2.0)
Updated by Debbie Lockett almost 4 years ago
- Fix Committed on JS Branch 2 added
- Fix Committed on JS Branch deleted (
Trunk)
Updated by Debbie Lockett over 3 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 2.1
Bug fix applied in the Saxon-JS 2.1 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page