jenkinsci / jenkinsci/postbuild-task-plugin

[JENKINS-70280] Postbuild-task-plugin doesn`t handle line feed (U+000A)

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
component:postbuild-task-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
8
Forks
19
Avg merge
38m
Merged PRs (30d)
1

Description

I try to perform post-build script by Post build task on Windows 10 x64 Pro(Jenkins Slave Agent).

Post build task doesn`t handle new line (UTF-8 0x0A) symbol. For example (in Jenkins GUI %%0A): 

curl -X POST --ssl-no-revoke https://api.telegram.org/somebotID/sendMessage -d chat_id=555555555 -d text="first line text %%0A second line text" 

But, "Post build task" passes to CURL only 'A', like this (from Jenkins log):

curl -X POST --ssl-no-revoke https://api.telegram.org/somebotID/sendMessage -d chat_id=555555555 -d text="first line text A second line text"  

Of course i can`t get new line.

I try this script on "Execute Windows batch command" in build section (not post build section) and easy to get new line. From Jenkins log (CURL has %0A):

curl -X POST --ssl-no-revoke https://api.telegram.org/somebotID/sendMessage -d chat_id=555555555 -d text="first line text %0A second line text"  

---
Originally reported by ushkov, imported from: Postbuild-task-plugin doesn`t handle line feed (U+000A)


  • status: Open
  • priority: Major
  • component(s): postbuild-task-plugin
  • label(s): jenkins, plugin, windows
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251223-222157

Raw content of original issue

I try to perform post-build script by Post build task on Windows 10 x64 Pro(Jenkins Slave Agent).

Post build task doesn`t handle new line (UTF-8 0x0A) symbol. For example (in Jenkins GUI %%0A): 



curl -X POST --ssl-no-revoke https://api.telegram.org/somebotID/sendMessage -d chat_id=555555555 -d text="first line text %%0A second line text" 


But, "Post build task" passes to CURL only 'A', like this (from Jenkins log):



curl -X POST --ssl-no-revoke https://api.telegram.org/somebotID/sendMessage -d chat_id=555555555 -d text="first line text A second line text"  


Of course i can`t get new line.

I try this script on "Execute Windows batch command" in build section (not post build section) and easy to get new line. From Jenkins log (CURL has %0A):



curl -X POST --ssl-no-revoke https://api.telegram.org/somebotID/sendMessage -d chat_id=555555555 -d text="first line text %0A second line text"  

environment

```
Jenkins 2.375.1

Post build task Version: 1.9

Windows 10 x64 Pro
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.