Skip to content Skip to sidebar Skip to footer

Url Being Encoded Wrong

I'm getting confused passing the http:// in a string to the url as it is being stripped to http%3A%2F%2F I tried.. using the encodeURIComponent(http://) but that didn't work eit

Solution 1:

Just do it as simple as:

var facebook_url = 'http://www.facebook.com/sharer.php?url=' + encodeURIComponent('http://www.site.com/folder1/' + findfb +'&title=' + 'title of page');

Post a Comment for "Url Being Encoded Wrong"