Skip to content

Instantly share code, notes, and snippets.

@SuperRembo
Created May 24, 2020 19:29
Show Gist options
  • Save SuperRembo/aaab7471d1d8f8ebfcaf3d8e3114562b to your computer and use it in GitHub Desktop.
Save SuperRembo/aaab7471d1d8f8ebfcaf3d8e3114562b to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Encoding Test</title>
</head>
<body>
<p>
<button onclick="alert(1 & 2)">Test 1 not encoded</button>
<button onclick="alert(1 &amp; 2)">Test 1 encoded</button>
</p>
<p>
<button onclick="alert('One & two')">Test 2 not encoded</button>
<button onclick="alert(&#39;One &amp; two&#39;)">Test 2 not encoded</button>
</p>
<p>
<button onclick="location='http://localhost/?one&two'">Test 3 not encoded</button>
<button onclick="location=&#39;http://localhost/?one&amp;two&#39;">Test 3 encoded</button>
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment