Skip to content

Instantly share code, notes, and snippets.

@pure
Created December 16, 2009 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pure/258145 to your computer and use it in GitHub Desktop.
Save pure/258145 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<div>
<a><h1></h1><div>abc</div></a>
</div>
<script>
//this line fails in FF
document.getElementsByTagName('h1')[0].innerHTML = 'some H1';
//show the result
document.write(document.getElementsByTagName('div')[0].innerHTML.replace(/</g, '&lt;').replace(/>/g, '&gt;'));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment