forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtst.js
More file actions
25 lines (18 loc) · 614 Bytes
/
tst.js
File metadata and controls
25 lines (18 loc) · 614 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// OK: we don't know whether the two elements are added to the same document
var div1 = <div id="theDiff"></div>;
var div2 = <div id="theDiff"></div>;
// not OK
<a href="http://semmle.com" href="https://semmle.com">Semmle</a>;
// not OK
<a href="https://semmle.com" href="https://semmle.com">Semmle</a>;
// not OK
<div id=""></div>;
<div id="a b"></div>;
// not OK
<a href="http://semmle.com" href={someValue()}>Semmle</a>;
// OK
<div id={someOtherValue()}></div>;
// not OK
var div3 = <div><div id="theDiff"></div><div id="theDiff"></div></div>;
// not OK
var div4 = <div id="theDiff" id="theDiff"></div>;