mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Add unit test for contextual escape
This commit is contained in:
parent
d7cf825a7d
commit
04a7734b2e
3 changed files with 75 additions and 0 deletions
27
tests/_data/template/v2contextual.executed.html
Normal file
27
tests/_data/template/v2contextual.executed.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
|
||||
<a href="javascript:alert('Hello \u003C\u0022world\u0022\u003E (\u0027string\u0027) variable.jpg')">
|
||||
Hello <"world"> ('string') variable.jpg</p>
|
||||
|
||||
<p onclick="location.href = 'Hello \u003C\u0022world\u0022\u003E (\u0027string\u0027) variable.jpg';">
|
||||
<span style="font: Hello <"world"> ('string') variable.jpg">
|
||||
Hello <"world"> ('string') variable.jpg </span>
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
function() {
|
||||
const foo = 'Hello \u003C\u0022world\u0022\u003E (\u0027string\u0027) variable.jpg';
|
||||
const bar = 'Hello <"world"> ('string') variable.jpg';
|
||||
const json = "Hello \u003C\u0022world\u0022\u003E ('string') variable.jpg";
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-image: url('Hello <"world"> ('string') variable.jpg');
|
||||
}
|
||||
</style>
|
||||
|
||||
<ul class="test">
|
||||
<li>Hello <"world"> ('string') variable.jpg</li>
|
||||
<li>Hello <"world"> ('string') variable.jpg</li>
|
||||
</ul>
|
||||
Loading…
Add table
Add a link
Reference in a new issue