Skip to main content

Hi, everyone.

I’m trying to send a text to the Description field - 

Text = Hello\nWorld\n

The ‘\n’ is really ‘\n’ and not a special character.

How do I change the literal backslash + n ("\n") to a newline character?

Background - I parse the ticket and received 

“Hello\nWorld\n”, I sent that response to the worknotes and it also shows the same   “Hello\nWorld\n”.

Hi.

Have you tried using a real New Line like in:

“Hello

World”

?

 

You may also try on the Developer’s forum: Freshworks Developer Community

 

Best,


Hi, everyone.

I’m trying to send a text to the Description field - 

Text = Hello\nWorld\n

The ‘\n’ is really ‘\n’ and not a special character.

How do I change the literal backslash + n ("\n") to a newline character?

Background - I parse the ticket and received 

“Hello\nWorld\n”, I sent that response to the worknotes and it also shows the same   “Hello\nWorld\n”.

Is the source you get the information with \n as new lines? 

the Description/notes/reply accept HTML so < br > 

Could look at  newline_to_br – Liquid template language  
 


I parsed the ticket description so the \n is a literal “backlash ”and “n”, it is no longer an html tag.
Could look at  newline_to_br – Liquid template language   --- tried it, but it didnt work


I parsed the ticket description so the \n is a literal “backlash ”and “n”, it is no longer an html tag.
Could look at  newline_to_br – Liquid template language   --- tried it, but it didnt work

You use the web request node to get the ticket ? 
Parse Freshservice ticket using the parser node ?  Then you should get HTML  tags. 

 

Okay, never tried my self, This LF tag do not work | sanitize_html ? ( Found here Powerful Placeholders with Liquid Filters : Freshservice ) 

 


You use the web request node to get the ticket ? --- yes

Parse Freshservice ticket using the parser node ?  Then you should get HTML  tags. --- yes but the tags will be converted to literal normal characters, they are no longer html tags

 sanitize_html  --- tried it also, not working

 


You use the web request node to get the ticket ? --- yes

Parse Freshservice ticket using the parser node ?  Then you should get HTML  tags. --- yes but the tags will be converted to literal normal characters, they are no longer html tags

 sanitize_html  --- tried it also, not working

 

Strange I haven’t seen that they getting converted, I know the expression node will remove HTML tags. 

Could you post a screenshot of the flow ? 


I just came across a ticket where a customer used a expression expression to build the JSON payload and the output had \n for line breaks.  did’n’t show in the output of the expression but the web request log showed \n 


Reply