I have this "Send Http Request to SharePoint", which check if there is a Term equals the FolderName, as follow:-
now the main issue is with the highlighted parameter
where the value of the highlighted parameter can have values such as:-
First-Example) Test Test2
Second-Example) Test ' Test
Third-Example) Test # Test
Now i were passing the parameters as-is `variables('FolderName')` >> which will work for the first-Example only.
So i did this replace to be able to pass single quote `replace(variables('FolderNameWithoutUnAllowedChars'),'''','''''')` >> which will work for the first-example & second-example only
Also if i only do this `encodeUriComponent(variables('FolderNameWithoutUnAllowedChars'))` without the replace >> this will work for First-example & Third-example only
So i did this to be able to pass single quote and special charecter such as "#" `encodeUriComponent(replace(variables('FolderNameWithoutUnAllowedChars'),'''',''''''))` >> which work for all values..
My question is if i am ding things correctly ? is it normal to do replace() & encodeUriComponent() to pass parameters inside the Uri field? or there is a more straight forward approach?
Thanks