Hi,
I have string values returned from Power Automate that contain line breaks expressed as "\n" within the text. I tried several alternatives to replace those with "<br>", "</br>", etc., but HTML does not seem to work.
Which formats are supported for line breaks?
Thanks,
AgustĂn
For those coming late to the party, you should know that as at end 2023 pva copilot does not seem to support anything like encode/decode. I got this to work by using something like Plaintext("text1<p>text2")
Sure, @HackManFrank. As suggested by @ChristianAbata, in Power Automate, I used the uriComponentToString function to replace "\n" with the HTML URL encoding for line feed, as follows:
I hope it helps.
Hey @adafieno.
Can you tell me, how exactly you got it working? I seem to misunderstand some of the details regarding the function expression used in the solution post.
Thank you
Thanks, Christian. That did it. Much appreciated.
@adafieno did you try encoding uri? https://powerusers.microsoft.com/t5/Building-Flows/Replace-Newline-in-Flow-Expression/td-p/57333
In this example the user is deleteing a line break.
see in PA you an encode an decode uri, so you can replace <br> with %0A%0A and in a compose action you can see a line break the you can send your output response to PA again.
Thanks for your suggestion, Christian. That type of encoding doesn't work either.
It seems like the problem lies within the rendering component of Power Virtual Agents. It looks like it's not able to parse and render line breaks.
hi @adafieno did you use encoding html https://www.w3schools.com/tags/ref_urlencode.ASP
%0A
is equals to break
Thanks. Yes, I did use "/s/s", and also "\s\s" which is what the documentation you sent me says.
Did you use /s/s markdown tag to indicate a double empty space?
Thanks. That doesn't work either. It just renders two spaces wherever there's a "\n" string.
I need a way to insert actual line break characters into the string to render correctly in markdown. The double spaces force the new line, but it assumes that the text has a line break in the end.
Ekta Gupta
4
ricardodesouza
2
L-1234567-0
2