Open rcousineau-xandr opened 1 year ago
in the evaluate function, parentheses and colons are escaped:
evaluate
function evaluate { __var=$1 # escape ( and ) from markdown __var="${__var//\(/\\(}" __var="${__var//\)/\\)}" __var="${__var//\:/\\:}" __var=`eval echo $__var` echo $__var }
i'm trying to send a message that includes <pre> which I know is possible (did it with a bot) in Teams messages
<pre>
the error I got was:
/opt/resource/out: eval: line 16: syntax error near unexpected token `newline'
tried quoting the message like so:
text: | "The **$BUILD_JOB_NAME** job FAILED ($BUILD_PIPELINE_NAME)<pre>test</pre>"
and was greeted with a new error:
Newtonsoft.Json.JsonReaderException: Bad JSON escape sequence: \(. Path 'text', line 1, position 67.
I don't know if more symbols need to be escaped, or if I need to escape the brackets in the yaml, or if this is simply impossible because of bash...
in the
evaluate
function, parentheses and colons are escaped:i'm trying to send a message that includes
<pre>
which I know is possible (did it with a bot) in Teams messagesthe error I got was:
tried quoting the message like so:
and was greeted with a new error:
I don't know if more symbols need to be escaped, or if I need to escape the brackets in the yaml, or if this is simply impossible because of bash...