Correct way of generating Source parameter value in your SharePoint Link
As you may already know that SharePoint uses Source parameter in query string to take you back to the page from where you came. The value of the Source paramter must be properly encoded. Don’t worry, you do not need to write your own Javascript function to do this. Just use already provided function called … Read more