cww3schools Posted February 18, 2011 Share Posted February 18, 2011 The example on page http://www.w3schools.com/jsref/jsref_encodeuricomponent.asp for encodeURIComponent() correctly states to usse the encodeURIComponent() and decodeURIComponent() function to decode an encoded URI component. However the example shows the encoding of the complete URI yielding an un usable URI. Example should only encode the component. Link to comment Share on other sites More sharing options...
jeffman Posted February 18, 2011 Share Posted February 18, 2011 Good point. The explanation might also point out that the function is especially useful when preparing data for an AJAX request. I honestly can't remember when I've used it for anything else. Link to comment Share on other sites More sharing options...
Fmdpa Posted February 27, 2011 Share Posted February 27, 2011 Social networking websites use it in their share/like widgets. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.