cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shane_G
Frequent Visitor

Desktop variable escaping the URL Encoded Percent Characters .i.e. %2F aka / (Forward Slash)

I was working with variables and found that it did not like URL Encoded Percent Characters .i.e. %2F aka / (Forward Slash) when I copied and pasted it, I am assuming this is b/c it is the wrapper for the variable in the Flow Designer, it was easy for me to fix (This time) replaced the characters with ascii values, BUT, was wondering if there is a way to escape the percent sign (and other special characters as needed) as in other languages like C# or JavaScript?

Use case that comes to mind is dynamic content, how do you scan and 'replace' the special characters and escape them???

As always, any and all help would be greatly appreciated, links, references, blogs, etc. are certainly welcome (Especially on this topic) and know I appreciate those who contribute and help guide me.


Stay safe.
Best Regards.
SG.

1 ACCEPTED SOLUTION

Accepted Solutions
fraenK
Super User
Super User

Usage and escaping is described here:

https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-manipulation

 

Occasionally, the percentage sign should be used as a simple character, instead of denoting a calculation. In those cases, it should be escaped using another percentage character (%%).

 

Replace text: https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/text#replace

View solution in original post

2 REPLIES 2
fraenK
Super User
Super User

Usage and escaping is described here:

https://docs.microsoft.com/en-us/power-automate/desktop-flows/variable-manipulation

 

Occasionally, the percentage sign should be used as a simple character, instead of denoting a calculation. In those cases, it should be escaped using another percentage character (%%).

 

Replace text: https://docs.microsoft.com/en-us/power-automate/desktop-flows/actions-reference/text#replace

View solution in original post

evanchatter
Regular Visitor

An escape character enables you to output characters you wouldn't normally be able to, usually because the browser will interpret it differently to what you intended. The following code shows that the simple and easy method to escape HTML special chars in JavaScript.

 

var escape = document.createElement('textarea');
function escapeHTML(html) {
escape.textContent = html;
return escape.innerHTML;
}

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors
Users online (2,143)