I am creating table using for loop and in each loop making the text as url as below:
txt_2 += "<td> <a href=\"" + urlString + "/\">" + "Sample" + "</a></td>";
On clicking the original URL it downloads one file from AWS but when I click on this text 'Sample' on the page, this URL is having amp; where attributes are concatenated at & character, due to which on click the 'Sample' text it is giving an error and not downloading the file
From page:
https://test.s3.us-west-1.amazonaws.com/Sample?AWSAccessKeyId=XYZ&Expires=1534955149&Signature=ababa
Original:
https://test.s3.us-west-1.amazonaws.com/Sample?AWSAccessKeyId=XYZ&Expires=1534955149&Signature=ababa
I used below code to do the job in code(home.html) but when inspecting the element on the browser it shows me amp; again.
var urlString = url.replace(/&/g, '&');
Can i avoid URL to have amp; from the page?