jenkinsci / jenkinsci/postbuild-task-plugin
[JENKINS-70280] Postbuild-task-plugin doesn`t handle line feed (U+000A)
- 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)
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
Assessment
This issue has not been assessed yet.