Skip to content

[issue-195] Escape folder and file names#206

Open
nils-christian wants to merge 1 commit into
jenkinsci:mainfrom
nils-christian:issue-195
Open

[issue-195] Escape folder and file names#206
nils-christian wants to merge 1 commit into
jenkinsci:mainfrom
nils-christian:issue-195

Conversation

@nils-christian
Copy link
Copy Markdown

Disclaimer: This PR has been implemented with the help of Claude Code.

This PR fixes #195.

…ayName)

TestObject.safe() only replaces / \ : ? # % < > but passes Unicode letters
(umlauts) and spaces through unchanged. On systems where sun.jnu.encoding is
ASCII these characters cannot be encoded for OS filesystem calls, causing
"Malformed input or input contains unmappable characters" in mkdirs().

Wrap both TestObject.safe() calls in getAttachmentPath() with toAsciiSafe(),
which replaces anything outside printable ASCII (0x21-0x7E) with '_'.

Adds a reproducing test (testClassnameWithUmlautsAndSpaces) that creates an
inline XML report with a classname containing umlauts and spaces and asserts
the attachment is correctly stored and retrieved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nils-christian nils-christian requested a review from a team as a code owner April 22, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Escape folder and file names

1 participant