cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
560
Views
0
Helpful
1
Replies

SecureX Multiline Rendering

Hi all

I hope someone could answer me a question about multi line rendering. I've a json output in a python script but my \n always got rendered in a multiline (see attachement json).

Through that behaviour I'm not able to post this json as a message into a webex space because webex posts don't like multiline (see attachement webex).

 

In the python script I use the following lines to append \n:

 

ipObjectGroup = ""
for subnet in subnetsV4:
ipObjectGroup = ipObjectGroup + "network-object " + subnet + "\n"
for subnet in subnetsV6:
ipObjectGroup = ipObjectGroup + "network-object " + subnet + "\n"

 

 

Thanks for you help!

1 REPLY 1
chrivand
Cisco Employee

Hi Guys! Are you using the webexteamssdk? If so you can set a parameter to markdown quite easily and use line breaks. I have an example below where it works for me (from line 208 to 214):

https://github.com/chrivand/twitter_search_threatresponse/blob/master/twitter_search.py#L208