<font color="white">Профиль <b><login>{username}</login></b></font>
document.getElementsByTagName('a')[0].onclick = function() {
str = str.replace( /<login>(.*)<\/login>/, 'username=$1'); // str = 'username=Nick'
var csvData = 'data:application/txt;charset=utf-8,' + encodeURIComponent(text);
this.href = csvData;
this.target = '_blank';
this.download = 'MC.ini';