I would imagine that all of these would work.
But only 4 work. The others produce "missing )" errors.

All the "code checkers" I've run them through, claim "no errors at all". None of the string literals contain any single or double quotes at all.

What is the secret way to escape *ALL* text to avoid *ALL* errors.

```html
 <div onclick='alert("Bob&apos;s"          );'> 1 works </div>
 <div onclick="alert('Fred&apos;s'         );"> 2 fails </div>
 <div onclick='alert("Say &quot; hi &quot;");'> 3 fails </div>
 <div onclick="alert('Say &quot; hi &quot;');"> 4 works </div>
 <div onclick='alert("Bob&#39;s"           );'> 5 works </div>
 <div onclick="alert('Bob&#39;s'           );"> 6 fails </div>
 <div onclick='alert("Say &#34; hi &#34;"  );'> 7 fails </div>
 <div onclick="alert('Say &#34; hi &#34;'  );"> 8 works </div>
```