Forum Discussion
Logic app search replace function usage example?
- Dec 15, 2021
hi SocInABox
Not sure if it's the same, but, I've feced something similar with an HTML table where I wanted to include a hyper link using <a href> and Logic App replaced those chars.
What I did was process the HTML content before using it (Send Email) as an expression
replace(replace(variables('email_html'), '<', '<'), '>', '>')Maybe my scenario is simplier than the one you have but hope it helps
hi SocInABox
Not sure if it's the same, but, I've feced something similar with an HTML table where I wanted to include a hyper link using <a href> and Logic App replaced those chars.
What I did was process the HTML content before using it (Send Email) as an expression
Hey cmaneiro, thanks! that worked for me.
Took me a minute to realize your example was a 'replace inside of a replace', which was more than i needed.
I was able to replace all of the html content containing '\n' with '' ('' = nothing).
So my solution was:
- collect all variables (which contain html markup) and assign them all to a single variable.
- replace all \n values with nothing.
- use the cleaned up variable in my Sentinel Incident comments.
The result is a much better formatted html with only one line feed between the text body and the table (before there were 8 linefeeds!)