forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConflictingAttributes.qhelp
More file actions
39 lines (31 loc) · 912 Bytes
/
ConflictingAttributes.qhelp
File metadata and controls
39 lines (31 loc) · 912 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
According to the HTML5 standard, an HTML element must not have two or more attributes with
the same name. Elements that do not conform to this restriction may be interpreted differently
by different browsers.
</p>
</overview>
<recommendation>
<p>
Inspect the element in question and delete all but one of the conflicting attributes.
</p>
</recommendation>
<example>
<p>
The following HTML snippet contains an anchor element with two conflicting <code>href</code>
attributes:
</p>
<sample src="examples/ConflictingAttributes.html"/>
<p>
The conflict can be resolved by deleting the first attribute:
</p>
<sample src="examples/ConflictingAttributesGood.html"/>
</example>
<references>
<li>HTML5 Standard: <a href="https://www.w3.org/TR/html5/syntax.html#attributes-0">8.1.2.3 Attributes</a>.</li>
</references>
</qhelp>