URL encoding in HTML
URL needs to be converted to into specific format using encodeURIComponent function in JavaScript. e.g. After converting the Url "http://www.softpost.org/@", it will look like "http%3A%2F%2Fwww.softpost.org%2F%40"
console.log(encodeURIComponent('http://www.softpost.org/@'));
// http%3A%2F%2Fwww.softpost.org%2F%40
Please note that some database connections(e.g. mongodb) are in url formats so they need to be encoded as well. Otherwise you will see error saying "MongooseError Solved - err URI must include hostname, domain name, and tld - Mongodb error"Web development and Automation testing
solutions delivered!!