I'm using js to edit HTML and the code that I'm trying to run is bounded by quotations, which is using something bounded by apostrophes which in turn needs to use something bounded by quotations. the issue is that thinner quotations end the outer quotations prematurely. what do I do? (code below) see this question for more context, or if you have an alternative solution based on that
if(window.location == "https://www.hiring.example.com" || "https://example.hr/?"){
document.getElementsByTagName("a")[8].innerHTML = "<a href='/p/2066e45ed47a-commercial-real-estate-mortgage-broker/apply'><button class='button apply polygot button-right bzyButtonColor'>Apply</button><h2>Commercial Mortgage Broker — Apply Now</h2><ul class='meta'><li class='location'><i class='fa fa-wifi'></i><span class='polygot'>Remote OK</span></li><li class='type'><i class='fa fa-building'></i><span class='polygot'>Full-Time</span></li><li class='department'><i class='fa fa-building'></i><span>Multi-Family Group</span></li></ul><button class='button apply polygot button-full bzyButtonColor'>Apply</button><\a>";
document.getElementsByTagName("a")[1].innerHTML = "<a href='https://www.example.com/mfg' class='brand'><img src='https://gallery-cdn.breezy.hr/ab67d180-5ac3-43ce-8016-f80713fe5ebb/EU LOGO 3.jpg'></a>";
document.getElementsByTagName("a")[4].innerHTML = '<a href="/p/2066e45ed47a-commercial-real-estate-mortgage-broker/apply" style="background-color: rgba(0,0,0,0.2);<span class="polygot">APPLY NOW</span></a>';
}
else{
var scrpt = document.createElement("script");
scrpt.innerHTML = '<script>
if(window.location == "https://www.hiring.easternunion.com/ || "https://example.hr/?" || "https://example.hr/"){
}
else{
document.getElementsByTagName("a")[0].innerHTML = "<a href='https://www.example.com/mfg' class='brand'><img src='https://gallery-cdn.example.hr/ab67d180-5ac3-43ce-8016-f80713fe5ebb/EU LOGO 3.jpg'></a>";
}
</script>';
document.body.appendChild(scrpt);
}