TIL: you need to escape the </script> in a string in an inline script in HTML

1 · · Feb. 3, 2024, midnight
Summary
When I was implementing this change in my site, I ran into a weird issue where my literal JavaScript text was being inserted into the page as if it was in the literal HTML. This was odd at first, but then I realized what was going on. I was converting code that looked like this: <script src="https://ethical-ads.whatever/script.js" async></script> <div data-ea-publisher="christinewebsite" data-ea-type="text" data-ea-style="fixedfooter" ></div> ...