Not passing a test on convert html entities challenges

Only first case is running.

code:

function convertHTML(str) {
let astr=str.split("");
let rstr=""+str;
for( let x of astr){
  switch(x){
    case "&":
    rstr=rstr.replace("&","&");
    break;
    case "<":
     rstr=rstr.replace("<","&​lt;");
     break;
      case ">":
     rstr=rstr.replace(">","&​gt;");
     break;
      case '"' :
     rstr=rstr.replace('"'," &​quot;");
     break;
      case "'":
     rstr=rstr.replace("'","&​apos;");
     break;

  }
}
  return rstr;
}

convertHTML("Dolce & Gabbana");

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/convert-html-entities/