Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

URI value not displaying as wanted - Because variable is encoded REST SharePoint

$
0
0

Hi 

i have a variable that is passed to a function as wingtip\admin. which i need to use to generate the url to getthe user profile properties page.i'm not sure what i'm missing here but the full url seems to be encoded thereby screwing up the complete url that intend generating. any ideas how i can over come this.

function geturl(user){

//user = 'wingtip\admin' (.....this the value that is passed into the funtion....)

uri: _spPageContextInfo.webAbsoluteUrl + "/api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@V)@v='" +user+ "'";

}

the resulting url comes out as http:\\intranet.wingtip.com/api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@V)@v=%27wingtip%5Cadmin

instead of 

http:\\intranet.wingtip.com/api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@V)@v=%27wingtip\admin%27

not sure what i'm doing wrong

the single quotes come out as %27wingtip\admin%27....which is fine but the problem is how to prevent the backslash from being converted to %5C


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>