Skip to content

How to strip newline (\n) for webhook template? #210

Answered by http403
http403 asked this question in Q&A
Discussion options

You must be logged in to vote

You're right. I found the input is wrong. I have corrected post up top. The first charater is indeed \r not \n, and there are tons of leading spaces in the output. This is the root cause why the testing passed but not in actual use. However, js does solve the problem.

The actual output by restic via stderr in base64: ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANc2lnbmFsIGludGVycnVwdCByZWNlaXZlZCwgY2xlYW5pbmcgdXAK

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@http403
Comment options

Answer selected by http403
@http403
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants