window.open(encodeURI('data:text/csv;charset=utf-8,name,color\njohn,#000000'));
When running the above line in Chrome, a downloaded csv file is generated with the following content:
name,color
john,
The issue here is that it appears to be ignoring everything after the # symbol. Any thoughts on why this might be happening?
ps: Interestingly, Safari seems to handle this without any problems, opening a new tab with all the content intact.